Delegator Rewards
curl --request GET \
--url https://api.rated.network/v0/polygon/delegators/{delegator_address}/rewards \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.rated.network/v0/polygon/delegators/{delegator_address}/rewards"
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/v0/polygon/delegators/{delegator_address}/rewards', 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/v0/polygon/delegators/{delegator_address}/rewards",
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/v0/polygon/delegators/{delegator_address}/rewards"
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/v0/polygon/delegators/{delegator_address}/rewards")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rated.network/v0/polygon/delegators/{delegator_address}/rewards")
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{
"page": {
"from": 123,
"to": 123,
"granularity": "checkpoint",
"size": 1
},
"total": 1,
"data": [
{
"checkpoint": 54664,
"delegatorAddress": "0x40730f34668afcb3884f050cbc3d376a444bbe44",
"missedRewards": 75.25,
"rewards": 1250.45,
"validatorId": 103
}
],
"next": "<string>"
}{
"detail": [
{
"msg": "<string>",
"type": "<string>",
"loc": [
"<string>"
]
}
]
}Delegators
Delegator Rewards
GET
/
v0
/
polygon
/
delegators
/
{delegator_address}
/
rewards
Delegator Rewards
curl --request GET \
--url https://api.rated.network/v0/polygon/delegators/{delegator_address}/rewards \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.rated.network/v0/polygon/delegators/{delegator_address}/rewards"
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/v0/polygon/delegators/{delegator_address}/rewards', 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/v0/polygon/delegators/{delegator_address}/rewards",
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/v0/polygon/delegators/{delegator_address}/rewards"
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/v0/polygon/delegators/{delegator_address}/rewards")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rated.network/v0/polygon/delegators/{delegator_address}/rewards")
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{
"page": {
"from": 123,
"to": 123,
"granularity": "checkpoint",
"size": 1
},
"total": 1,
"data": [
{
"checkpoint": 54664,
"delegatorAddress": "0x40730f34668afcb3884f050cbc3d376a444bbe44",
"missedRewards": 75.25,
"rewards": 1250.45,
"validatorId": 103
}
],
"next": "<string>"
}{
"detail": [
{
"msg": "<string>",
"type": "<string>",
"loc": [
"<string>"
]
}
]
}This endpoint returns information about the rewards received by a delegator and the rewards it has missed out on over a number of checkpoints. The rewards can be broken down at a per checkpoint level or daily level as well.
Here’s how to interpret the inputs required to operate it 👇
| Parameter | Context |
|---|---|
| from | Starting (highest) checkpoint (integer, e.g. 54000) or UTC date (e.g. from=“2023-11-22”) |
| to | Ending (lowest) checkpoint (integer, e.g. 52922) or UTC date (e.g. from=“2023-10-31”) |
| granularity | The size of time increments you are looking to query. Can be checkpoint or day |
| size | The number of results included per page |
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
The starting (highest) checkpoint or date (UTC) to return. For example, 41100 or 2021-01-01.
The ending (lowest) checkpoint or date (UTC) to return. For example, 41100 or 2021-01-01.
Checkpoint or UTC day
Available options:
checkpoint, day Maximum number of time periods (days or checkpoint) in the results.