ValidatorHistoricalRewards
curl --request GET \
--url https://cosmos-rest.publicnode.com/cosmos/distribution/v1beta1/validators/{validatorAddress}/historical_rewards/{period}import requests
url = "https://cosmos-rest.publicnode.com/cosmos/distribution/v1beta1/validators/{validatorAddress}/historical_rewards/{period}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://cosmos-rest.publicnode.com/cosmos/distribution/v1beta1/validators/{validatorAddress}/historical_rewards/{period}', 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://cosmos-rest.publicnode.com/cosmos/distribution/v1beta1/validators/{validatorAddress}/historical_rewards/{period}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://cosmos-rest.publicnode.com/cosmos/distribution/v1beta1/validators/{validatorAddress}/historical_rewards/{period}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://cosmos-rest.publicnode.com/cosmos/distribution/v1beta1/validators/{validatorAddress}/historical_rewards/{period}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cosmos-rest.publicnode.com/cosmos/distribution/v1beta1/validators/{validatorAddress}/historical_rewards/{period}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"rewards": {
"cumulative_reward_ratio": [
{
"denom": "<string>",
"amount": "<string>"
}
],
"reference_count": 123
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}distribution
ValidatorHistoricalRewards
gRPC: cosmos.distribution.v1beta1.Query/ValidatorHistoricalRewards (reference)
ValidatorHistoricalRewards queries historical rewards for a validator at a specific period.
GET
/
cosmos
/
distribution
/
v1beta1
/
validators
/
{validatorAddress}
/
historical_rewards
/
{period}
ValidatorHistoricalRewards
curl --request GET \
--url https://cosmos-rest.publicnode.com/cosmos/distribution/v1beta1/validators/{validatorAddress}/historical_rewards/{period}import requests
url = "https://cosmos-rest.publicnode.com/cosmos/distribution/v1beta1/validators/{validatorAddress}/historical_rewards/{period}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://cosmos-rest.publicnode.com/cosmos/distribution/v1beta1/validators/{validatorAddress}/historical_rewards/{period}', 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://cosmos-rest.publicnode.com/cosmos/distribution/v1beta1/validators/{validatorAddress}/historical_rewards/{period}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://cosmos-rest.publicnode.com/cosmos/distribution/v1beta1/validators/{validatorAddress}/historical_rewards/{period}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://cosmos-rest.publicnode.com/cosmos/distribution/v1beta1/validators/{validatorAddress}/historical_rewards/{period}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cosmos-rest.publicnode.com/cosmos/distribution/v1beta1/validators/{validatorAddress}/historical_rewards/{period}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"rewards": {
"cumulative_reward_ratio": [
{
"denom": "<string>",
"amount": "<string>"
}
],
"reference_count": 123
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Path Parameters
validator_address defines the validator address to query for.
period defines the period to query historical rewards for.
Response
A successful response.
QueryValidatorHistoricalRewardsResponse is the response type for the Query/ValidatorHistoricalRewards RPC method.
rewards
ValidatorHistoricalRewards represents historical rewards for a validator.
Height is implicit within the store key.
Cumulative reward ratio is the sum from the zeroeth period
until this period of rewards / tokens, per the spec.
The reference count indicates the number of objects
which might need to reference this historical entry at any point.
ReferenceCount =
number of outstanding delegations which ended the associated period (and
might need to read that record)
+ number of slashes which ended the associated period (and might need to
read that record)
+ one per validator for the zeroeth period, set on initialization · object | null
rewards defines the historical rewards of a validator.
Show child attributes
Show child attributes
Was this page helpful?