Retrieve Beacon Chain restaking TVL
curl --request GET \
--url https://api.eigenexplorer.com/metrics/tvl/beacon-chain \
--header 'X-API-Token: <x-api-token>'import requests
url = "https://api.eigenexplorer.com/metrics/tvl/beacon-chain"
headers = {"X-API-Token": "<x-api-token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Token': '<x-api-token>'}};
fetch('https://api.eigenexplorer.com/metrics/tvl/beacon-chain', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.eigenexplorer.com/metrics/tvl/beacon-chain",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Token: <x-api-token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.eigenexplorer.com/metrics/tvl/beacon-chain"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Token", "<x-api-token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.eigenexplorer.com/metrics/tvl/beacon-chain")
.header("X-API-Token", "<x-api-token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eigenexplorer.com/metrics/tvl/beacon-chain")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Token"] = '<x-api-token>'
response = http.request(request)
puts response.read_body{
"tvl": 1000000,
"change24h": {
"value": 10,
"percent": 0.01
},
"change7d": {
"value": 10,
"percent": 0.01
}
}{
"error": {
"code": "bad_request",
"message": "The requested resource was not found.",
"doc_url": "https://docs.eigenexplorer.com/api-reference/errors#bad_request"
}
}{
"error": {
"code": "unauthorized",
"message": "The requested resource was not found.",
"doc_url": "https://docs.eigenexplorer.com/api-reference/errors#unauthorized"
}
}{
"error": {
"code": "forbidden",
"message": "The requested resource was not found.",
"doc_url": "https://docs.eigenexplorer.com/api-reference/errors#forbidden"
}
}{
"error": {
"code": "not_found",
"message": "The requested resource was not found.",
"doc_url": "https://docs.eigenexplorer.com/api-reference/errors#not_found"
}
}{
"error": {
"code": "unprocessable_entity",
"message": "The requested resource was not found.",
"doc_url": "https://docs.eigenexplorer.com/api-reference/errors#unprocessable_entity"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "The requested resource was not found.",
"doc_url": "https://docs.eigenexplorer.com/api-reference/errors#rate_limit_exceeded"
}
}{
"error": {
"code": "internal_server_error",
"message": "The requested resource was not found.",
"doc_url": "https://docs.eigenexplorer.com/api-reference/errors#internal_server_error"
}
}Ecosystem Metrics
Retrieve Beacon Chain restaking TVL
Returns the total value locked (TVL) in the Beacon Chain restaking EigenPods.
GET
/
metrics
/
tvl
/
beacon-chain
Retrieve Beacon Chain restaking TVL
curl --request GET \
--url https://api.eigenexplorer.com/metrics/tvl/beacon-chain \
--header 'X-API-Token: <x-api-token>'import requests
url = "https://api.eigenexplorer.com/metrics/tvl/beacon-chain"
headers = {"X-API-Token": "<x-api-token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Token': '<x-api-token>'}};
fetch('https://api.eigenexplorer.com/metrics/tvl/beacon-chain', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.eigenexplorer.com/metrics/tvl/beacon-chain",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Token: <x-api-token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.eigenexplorer.com/metrics/tvl/beacon-chain"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Token", "<x-api-token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.eigenexplorer.com/metrics/tvl/beacon-chain")
.header("X-API-Token", "<x-api-token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eigenexplorer.com/metrics/tvl/beacon-chain")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Token"] = '<x-api-token>'
response = http.request(request)
puts response.read_body{
"tvl": 1000000,
"change24h": {
"value": 10,
"percent": 0.01
},
"change7d": {
"value": 10,
"percent": 0.01
}
}{
"error": {
"code": "bad_request",
"message": "The requested resource was not found.",
"doc_url": "https://docs.eigenexplorer.com/api-reference/errors#bad_request"
}
}{
"error": {
"code": "unauthorized",
"message": "The requested resource was not found.",
"doc_url": "https://docs.eigenexplorer.com/api-reference/errors#unauthorized"
}
}{
"error": {
"code": "forbidden",
"message": "The requested resource was not found.",
"doc_url": "https://docs.eigenexplorer.com/api-reference/errors#forbidden"
}
}{
"error": {
"code": "not_found",
"message": "The requested resource was not found.",
"doc_url": "https://docs.eigenexplorer.com/api-reference/errors#not_found"
}
}{
"error": {
"code": "unprocessable_entity",
"message": "The requested resource was not found.",
"doc_url": "https://docs.eigenexplorer.com/api-reference/errors#unprocessable_entity"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "The requested resource was not found.",
"doc_url": "https://docs.eigenexplorer.com/api-reference/errors#rate_limit_exceeded"
}
}{
"error": {
"code": "internal_server_error",
"message": "The requested resource was not found.",
"doc_url": "https://docs.eigenexplorer.com/api-reference/errors#internal_server_error"
}
}Aligning with the methodology used on the EigenLayer Dashboard, we use raw
balances and do not count queued withdrawals.
Headers
API Token for authentication
Query Parameters
Toggle whether the route should return 24h/7d change for TVL
Available options:
true, false Example:
"false"
⌘I