Skip to main content
To start using Staking Data API, get an authentication token.
The section provides the examples of how to interact with the API for Ethereum data.

Response format

Every response is a JSON envelope with result 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
Paginated endpoints accept 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:
Example response:
  • 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 than startNumber.
  • 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.
    Passing an addressType that the network does not support returns 400.
  • validatorAddress — validator address in the required network for this delegator.
  • groupBy — group the output data: stakingPeriod, day, or all. day cannot be combined with startNumber / finishNumber; use startAt / finishAt instead, otherwise the request returns 400.
  • skip — set to validator to exclude the breakdown by validator from the report.
Example response:
  • 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 with groupBy=day. The part of stake that is already active on the Beacon Chain.
    • inactiveStake — optional; Ethereum only, returned only with groupBy=day. The part of stake that 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.
Example response:
  • state — validator state.
  • activatedAt — timestamp of the validator activated date in the ISO 8601 format.
  • activatedStakingPeriodNum — timestamp of the validator activated staking period.
You can also retrieve the information about validator statuses by sending a GET request to /api/v1/{network}/data/validator/statuses . Example request:
Example response:
  • 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.
    Passing an addressType that the network does not support returns 400.
  • 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 to validator to 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; pass rewardTypes=all to return every type.
Example response:
  • 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: consensus or execution.
      • 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:
This script gathers daily rewards data from a start date to the current date, saves the data to a file, and calculates the total rewards amount.

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:
Example output (with breaking down the result by validators):
  • 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: consensus or execution.
    • 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:
Example output (without breaking down the results by validators):
  • Staking Period — number of the staking period.
  • Start and End — 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.