Get attestation duties metrics for group of validators
curl --request GET \
--url https://api.rated.network/v1/eth/validators/attestations \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.rated.network/v1/eth/validators/attestations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.rated.network/v1/eth/validators/attestations', 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.rated.network/v1/eth/validators/attestations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <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.rated.network/v1/eth/validators/attestations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <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.rated.network/v1/eth/validators/attestations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rated.network/v1/eth/validators/attestations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"next": "https://api.rated.network//v1/eth/validators/attestations?limit=10&offset=30",
"pages": 10,
"previous": "https://api.rated.network//v1/eth/validators/attestations?limit=10&offset=10",
"results": [
[
{
"attester_effectiveness": 95.97701149425288,
"avg_correctness": 0.9896296296296296,
"avg_inclusion_delay": 1.031111111111111,
"date": "2023-01-01",
"day": 796,
"endDate": "2023-01-07",
"endDay": 802,
"endEpoch": 63775,
"hour": 19056,
"startDate": "2023-01-01",
"startDay": 796,
"startEpoch": 63744,
"sum_correct_head": 219,
"sum_correct_source": 225,
"sum_correct_target": 224,
"sum_inclusion_delay": 232,
"sum_late_head_votes": 1,
"sum_late_source_votes": 0,
"sum_late_target_votes": 0,
"sum_missed_attestations": 0,
"sum_wrong_head_votes": 1,
"sum_wrong_target_votes": 1,
"sync_signature_count": 0,
"total_attestation_assignments": 225,
"total_attestations": 230,
"total_unique_attestations": 225,
"uptime": 1
}
]
]
}{
"detail": [
{
"msg": "<string>",
"type": "<string>",
"loc": [
"<string>"
]
}
]
}Performance
Get attestation duties metrics for group of validators
This endpoint returns drilldowns on performance metrics around attestation duties for validators. You can use this endpoint to either aggregate data per validator across a time window or aggregate data for multiple validators per time period.
GET
/
v1
/
eth
/
validators
/
attestations
Get attestation duties metrics for group of validators
curl --request GET \
--url https://api.rated.network/v1/eth/validators/attestations \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.rated.network/v1/eth/validators/attestations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.rated.network/v1/eth/validators/attestations', 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.rated.network/v1/eth/validators/attestations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <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.rated.network/v1/eth/validators/attestations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <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.rated.network/v1/eth/validators/attestations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rated.network/v1/eth/validators/attestations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"next": "https://api.rated.network//v1/eth/validators/attestations?limit=10&offset=30",
"pages": 10,
"previous": "https://api.rated.network//v1/eth/validators/attestations?limit=10&offset=10",
"results": [
[
{
"attester_effectiveness": 95.97701149425288,
"avg_correctness": 0.9896296296296296,
"avg_inclusion_delay": 1.031111111111111,
"date": "2023-01-01",
"day": 796,
"endDate": "2023-01-07",
"endDay": 802,
"endEpoch": 63775,
"hour": 19056,
"startDate": "2023-01-01",
"startDay": 796,
"startEpoch": 63744,
"sum_correct_head": 219,
"sum_correct_source": 225,
"sum_correct_target": 224,
"sum_inclusion_delay": 232,
"sum_late_head_votes": 1,
"sum_late_source_votes": 0,
"sum_late_target_votes": 0,
"sum_missed_attestations": 0,
"sum_wrong_head_votes": 1,
"sum_wrong_target_votes": 1,
"sync_signature_count": 0,
"total_attestation_assignments": 225,
"total_attestations": 230,
"total_unique_attestations": 225,
"uptime": 1
}
]
]
}{
"detail": [
{
"msg": "<string>",
"type": "<string>",
"loc": [
"<string>"
]
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Available options:
mainnet, hoodi, holesky Query Parameters
The number of results returned per page
The number of results to skip before starting to return
End date
Example:
"2023-12-31"
Start date
Example:
"2023-01-01"
Start day
Required range:
x >= 0Example:
"791"
End day
Required range:
x >= 0Example:
"851"
Returns results based on UTC days (true) or ETH chain days (false)
A list of validator pubkeys you want to filter by
A list of validator indices you want to filter by
Required range:
x >= 0The filter you want results to be sorted by
The sort order for the results
Available options:
asc, desc Available options:
hour, day, week, month, quarter, year, all Available options:
granularity, validator