DOT Rewards
Returns delegator rewards (net, aka post-on-chain validator commission) by era. We return data for the past 30 days. Max 50 accounts per request.
General features described in Rewards Overview
stash_accounts
- type: array of strings
- required: Stash accounts addresses.
stash_accounts*
- ADD: string
start
- type: integer
- required: Either era (number) or timestamps (strings formatted like "YYYY-MM-DD").
end
- type: integer
- required: Either era (number) or timestamps (strings formatted like "YYYY-MM-DD").
time_rollup
- type: string
- enum: Defaults to era
Aggregation unit
- values:
era,daily
Returns
200 A rewards result set with metadata.
- type: object
- properties:
- data: array of objects
- data: object
- stash_account: string
- Returns the stash account or validator that received the rewards.
- validator: string
- The validator that distributed the rewards
- era: string
- The era number.
- active_era: integer
- timestamp: string
- The timestamp of the end of the era.
- rewards: array of objects
- rewards: object
- text: string
- The textual version of the other fields in the rewards object.
- currency: string
- Currency code (e.g. DOT)
- numeric: integer
- Raw reward amount in planck (smallest unit)
- exp: integer
- Subunit exponent
- text: string
- rewards: object
- balances: array of objects
- balances: object
- text: string
- The textual version of the other fields in the rewards object.
- currency: string
- Currency code (e.g. DOT)
- numeric: integer
- Raw account balance in planck (smallest unit)
- exp: integer
- Subunit exponent
- text: string
- balances: object
- stash_account: string
- data: object
- meta: object
- protocol: string
- The name of the protocol queried.
- network: string
- The name of the network queried.
- time_rollup: string
- The unit of the rollup.
- protocol: string
- data: array of objects
Error Codes
- 400: Parameter error
- 401: Unauthorized
- 422: Unprocessable Entity
- 500: System error
Example CURL Request
curl --request POST \
--url https://api.figment.io/polkadot/rewards \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-api-key: your-api-key-here' \
--data '{
"time_rollup": "era"
}'
Example Response
{
"data": [
{
"stash_account": "13GzuCvjeTPi8EESc5HxgSqrzFgwiGEgSPt6q3HgU5UT4vZo",
"validator": "138QdRbUTB9eNY94Q4Mj5r39FkgMiyHCAy8UFMNA5gvtrfSB",
"era": "845",
"active_era": 0,
"timestamp": "2023-07-21T00:00:00Z",
"rewards": [
{
"text": "3.6694634053",
"currency": "DOT",
"numeric": 36694634053,
"exp": 10
}
],
"balances": [
{
"text": "211509.8626318288",
"currency": "DOT",
"numeric": 211509.8626318288,
"exp": 10
}
]
}
],
"meta": {
"protocol": "polkadot",
"network": "mainnet",
"time_rollup": "era"
}
}