DelegationTotalRewards
curl --request GET \
--url https://cosmos-rest.publicnode.com/cosmos/distribution/v1beta1/delegators/{delegatorAddress}/rewardsimport requests
url = "https://cosmos-rest.publicnode.com/cosmos/distribution/v1beta1/delegators/{delegatorAddress}/rewards"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://cosmos-rest.publicnode.com/cosmos/distribution/v1beta1/delegators/{delegatorAddress}/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://cosmos-rest.publicnode.com/cosmos/distribution/v1beta1/delegators/{delegatorAddress}/rewards",
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/delegators/{delegatorAddress}/rewards"
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/delegators/{delegatorAddress}/rewards")
.asString();require 'uri'
require 'net/http'
url = URI("https://cosmos-rest.publicnode.com/cosmos/distribution/v1beta1/delegators/{delegatorAddress}/rewards")
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": [
{
"validator_address": "<string>",
"reward": [
{
"denom": "<string>",
"amount": "<string>"
}
]
}
],
"total": [
{
"denom": "<string>",
"amount": "<string>"
}
],
"claimable": [
{
"denom": "<string>",
"amount": "<string>"
}
]
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}distribution
DelegationTotalRewards
gRPC: cosmos.distribution.v1beta1.Query/DelegationTotalRewards (reference)
DelegationTotalRewards queries the total rewards accrued by each validator.
GET
/
cosmos
/
distribution
/
v1beta1
/
delegators
/
{delegatorAddress}
/
rewards
DelegationTotalRewards
curl --request GET \
--url https://cosmos-rest.publicnode.com/cosmos/distribution/v1beta1/delegators/{delegatorAddress}/rewardsimport requests
url = "https://cosmos-rest.publicnode.com/cosmos/distribution/v1beta1/delegators/{delegatorAddress}/rewards"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://cosmos-rest.publicnode.com/cosmos/distribution/v1beta1/delegators/{delegatorAddress}/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://cosmos-rest.publicnode.com/cosmos/distribution/v1beta1/delegators/{delegatorAddress}/rewards",
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/delegators/{delegatorAddress}/rewards"
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/delegators/{delegatorAddress}/rewards")
.asString();require 'uri'
require 'net/http'
url = URI("https://cosmos-rest.publicnode.com/cosmos/distribution/v1beta1/delegators/{delegatorAddress}/rewards")
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": [
{
"validator_address": "<string>",
"reward": [
{
"denom": "<string>",
"amount": "<string>"
}
]
}
],
"total": [
{
"denom": "<string>",
"amount": "<string>"
}
],
"claimable": [
{
"denom": "<string>",
"amount": "<string>"
}
]
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Path Parameters
delegator_address defines the delegator address to query for.
Response
A successful response.
QueryDelegationTotalRewardsResponse is the response type for the Query/DelegationTotalRewards RPC method.
rewards defines all the rewards accrued by a delegator.
Show child attributes
Show child attributes
total defines the sum of all the rewards.
Show child attributes
Show child attributes
claimable defines the amount that can actually be withdrawn. Each delegation reward is truncated individually, mirroring what Msg/WithdrawDelegatorReward pays out, so claimable is at most total.
Show child attributes
Show child attributes
Was this page helpful?