Get aggregated effectiveness for validators
curl --request GET \
--url https://api.rated.network/v1/eth/validators/effectiveness \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.rated.network/v1/eth/validators/effectiveness"
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/effectiveness', 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/effectiveness",
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/effectiveness"
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/effectiveness")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rated.network/v1/eth/validators/effectiveness")
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/effectiveness?limit=10&offset=30",
"pages": 10,
"previous": "https://api.rated.network//v1/eth/validators/effectiveness?limit=10&offset=10",
"results": [
[
{
"attesterEffectiveness": 95.97701149425288,
"avgCorrectness": 0.9896296296296296,
"avgInclusion_delay": 1.031111111111111,
"date": "2023-01-01",
"day": 796,
"endDate": "2023-01-07",
"endDay": 802,
"endEpoch": 63775,
"hour": 19056,
"proposerEffectiveness": 99.53271028037379,
"startDate": "2023-01-01",
"startDay": 796,
"startEpoch": 63744,
"sumInclusion_delay": 232,
"uptime": 1,
"validatorEffectiveness": 99.53271028037379,
"validator_index": 1
}
]
]
}{
"detail": [
{
"msg": "<string>",
"type": "<string>",
"loc": [
"<string>"
]
}
]
}Performance
Get aggregated effectiveness for validators
The Rated API enables the aggregation of all the metrics that live under effectiveness across an arbitrary number of validator indices or pubkeys, at the endpoint level. 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
/
effectiveness
Get aggregated effectiveness for validators
curl --request GET \
--url https://api.rated.network/v1/eth/validators/effectiveness \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.rated.network/v1/eth/validators/effectiveness"
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/effectiveness', 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/effectiveness",
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/effectiveness"
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/effectiveness")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rated.network/v1/eth/validators/effectiveness")
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/effectiveness?limit=10&offset=30",
"pages": 10,
"previous": "https://api.rated.network//v1/eth/validators/effectiveness?limit=10&offset=10",
"results": [
[
{
"attesterEffectiveness": 95.97701149425288,
"avgCorrectness": 0.9896296296296296,
"avgInclusion_delay": 1.031111111111111,
"date": "2023-01-01",
"day": 796,
"endDate": "2023-01-07",
"endDay": 802,
"endEpoch": 63775,
"hour": 19056,
"proposerEffectiveness": 99.53271028037379,
"startDate": "2023-01-01",
"startDay": 796,
"startEpoch": 63744,
"sumInclusion_delay": 232,
"uptime": 1,
"validatorEffectiveness": 99.53271028037379,
"validator_index": 1
}
]
]
}{
"detail": [
{
"msg": "<string>",
"type": "<string>",
"loc": [
"<string>"
]
}
]
}