The section provides the examples of how to interact with the API for Ethereum data.
Response format
Every response is a JSON envelope withresult and error. On success, result holds the payload and error is empty. On failure, result is null and error contains code, message, name, and type. Error responses also include requestId (the value of the x-request-id header) and timestamp. Quote requestId when contacting support so the request can be found in the server logs.
Error response
limit (from 1 to 1000, default 50) and offset (default 0). Endpoints that accept startAt and finishAt reject a range longer than 31 days, and finishNumber must not be lower than startNumber. Not every endpoint is available on every network; see the Supported networks line for each method on the Network, Validator, and Delegator pages.
Using curl commands
Request examples are provided using cURL. To demonstrate the API usage scenarios, the examples cover:- retrieving the last staking period,
- fetching active stakes for validators,
- checking validator states,
- obtaining rewards by type.
Get Last Staking Period
To retrieve the last staking period, send a GET request to /api/v1/{network}/data/network/last-staking-period. Example request:period— last staking period.updatedAt— timestamp of the last update to the queue.
Get Delegator Stake
To fetch the stake of a delegator for each validator, send a GET request to /api/v1/{network}/data/delegator/stakes. Note that there is a list of additional query params. Example request:-
startNumber— start number of the staking period. -
finishNumber— finish number of the staking period. Cannot be lower thanstartNumber. -
limit— number of resources that a single response page contains. -
address— delegator address in the required network. -
addressType— delegator address type in the required network. If omitted, the default for the network is used:deposit— Ethereum (default).withdrawal— Ethereum.delegator— Solana (default), Sui, Cardano, Celestia.stake_account— Solana.nominator— Polkadot (default), Kusama (default), TON.nominator_reward_account— Polkadot, Kusama.
addressTypethat the network does not support returns400. -
validatorAddress— validator address in the required network for this delegator. -
groupBy— group the output data:stakingPeriod,day, orall.daycannot be combined withstartNumber/finishNumber; usestartAt/finishAtinstead, otherwise the request returns400. -
skip— set tovalidatorto exclude the breakdown by validator from the report.
-
limit— number of resources that a single response page contains. -
offset— number of resources to exclude from the beginning of a response. -
list:stakingPeriod— number of the staking period.stakingPeriodStart— timestamp of the staking period start in the ISO 8601 format.stakingPeriodEnd— timestamp of the staking period finish in the ISO 8601 format.stake— total stake balance of the delegator. On Ethereum this includes ETH that is still in the deposit or activation queue.activeStake— optional; Ethereum only, returned only withgroupBy=day. The part ofstakethat is already active on the Beacon Chain.inactiveStake— optional; Ethereum only, returned only withgroupBy=day. The part ofstakethat is still waiting to be activated.validator— validator address.
Get Validator State and Statuses
To retrieve validator state, send a GET request to /api/v1/{network}/data/validator/state. Example request:address— validator address in the required network. For the Ethereum network, it is a public validator key.
state— validator state.activatedAt— timestamp of the validator activated date in the ISO 8601 format.activatedStakingPeriodNum— timestamp of the validator activated staking period.
-
total— total count of validators. -
by_status:pending_initialized— number of validators which are initialized but not yet in the queue for activation.pending_queued— number of validators that entered a queue for activation.active_ongoing— number of validators that were activated and currently participate in attesting and proposing blocks.active_slashed— number of validators that were slashed due to misbehaviors.exited_unslashed— number of validators that have exited the network without being slashed and are no longer acting as validators.exited_slashed— number of validators that have exited the network after being slashed and are no longer acting as validators.withdrawal_possible— number of validators having a non-zero balance.withdrawal_done— number of validators completed the withdrawal process.
Get Delegator Rewards
To fetch a list of delegators rewards by type, send a GET request to /api/v1/{network}/data/delegator/rewards. Note that there is a list of additional query params, e.g., grouping the data by date. Example request:-
startAt— timestamp of the report data period start in the ISO 8601 format. If not specified, the default value is the one month ago. -
finishAt— timestamp of the report data period finish in the ISO 8601 format. If not specified, the default value is the current date. -
limit— number of resources that a single response page contains. -
address— delegator address in the required network. -
addressType— delegator address type in the required network. If omitted, the default for the network is used:deposit— Ethereum (default).withdrawal— Ethereum.delegator— Solana (default), Sui, Cardano, Celestia.stake_account— Solana.nominator— Polkadot (default), Kusama (default), TON.nominator_reward_account— Polkadot, Kusama.
addressTypethat the network does not support returns400. -
validatorAddress— validator address in the required network for this delegator. -
groupBy— group the output data:stakingPeriod— aggregate the results by epoch.day— aggregate the results by days.all— aggregate the results over the entire period.
-
skip— set tovalidatorto exclude the breakdown by validator from the report. -
rewardTypes— filter rewards by type. Pass a single value or repeat the key (?rewardTypes=consensus&rewardTypes=execution). Some networks exclude certain reward types by default; passrewardTypes=allto return every type.
-
limit— number of resources that a single response page contains. -
offset— number of resources to exclude from the beginning of a response. -
list:-
stakingPeriod— number of the staking period. -
stakingPeriodStart— timestamp of the staking period start in the ISO 8601 format. -
stakingPeriodEnd— timestamp of the staking period finish in the ISO 8601 format. -
rewards:type— rewards type:consensusorexecution.amount— amount of tokens in the stake.currency— currency of the tokens.recipient— rewards recipient address.
-
Using Python code
This section demonstrates how to use Python with the Staking Data API. The examples for Ethereum data cover:- fetching the delegator daily rewards,
- retrieving the summary for a delegator and validator.
Get Delegator Rewards
To fetch the daily rewards for a delegator, use the following code with the API endpoint /api/v1/{network}/data/delegator/rewards:Get Delegator Summary
To fetch the lifetime stake, rewards, and APY for a delegator, use the following code with the API endpoint /api/v1/{network}/data/delegator/summary:-
Gross APY— delegator annual percentage yield (APY) before the validator fee (grossApy). -
Net APY— delegator APY after the validator fee (netApy). -
Stake— total stake balance of the delegator. -
Rewards:Type— rewards type:consensusorexecution.Amount— amount of tokens in the stake.
Get Validator Summary
To retrieve the validator summary, use the following code with the API endpoint /api/v1/{network}/data/validator/summary:Staking Period— number of the staking period.StartandEnd— timestamp of the staking period start and finish in the ISO 8601 format.APY— validator annual percentage yield (APY).Stake— total stake balance of the validator.Rewards:Amount— amount of tokens in the stake.