Staking Data
Returns data from the staking ledgers The staking ledger of the current epoch is the snarked ledger of the last block of current epoch minus two.
Stake by Delegate
Filters the staking ledger for delegates. Summing the balance determines the stake of the delegate in the current epoch. Timing may be used to determine if the account is eligible for the supercharged coinbase rewards. If there is timing available, the following fields are included:
timed_in_epochis a boolean that istrueif the account has a time-locked balance at the start of the epoch.untimed_slotis the global slot at which the account is no longer timed. Useful if the account is untimed during the epoch.timed_epoch_endis a boolean that istrueif the account has a time-locked balance at the end of the epoch. Returnsnulliftimed_in_epochisfalse.
If the account has no timing information in the ledger timing will return null .
{ stakes( query: {delegate: "B62...", ledgerHash: "jx94..."} ) { public_key balance timing { cliff_amount cliff_time initial_minimum_balance vesting_increment vesting_period untimed_slot timed_in_epoch timed_epoch_end } }}Filter By Staking Ledger
Filter by staking ledger hash to return a specific staking ledger. Includes all historical staking ledgers.
{ stakes(limit: 10, query: {ledgerHash: "jx94FuTZwDmQrqczmWD3iBZcAmBqADdDj196dRXN9WqEBkMYTaY"}) { balance delegate public_key }}Top 10 Accounts in Staking Ledger
Find the biggest whales in the staking ledger.
{ stakes( query: {ledgerHash: "jx94FuTZwDmQrqczmWD3iBZcAmBqADdDj196dRXN9WqEBkMYTaY"} sortBy: BALANCE_DESC, limit: 10 ) { public_key balance }}Determine the Last Block of Epoch
The next staking ledger is only available after k blocks from the last block of the prior epoch. Adding k to the following result will determine when the next epoch ledger is available.
{ blocks( query: {protocolState: {consensusState: {epoch: 1}}} sortBy: DATETIME_DESC limit: 1 ) { protocolState { consensusState { blockHeight } } }}Filter Delegates to only those with Timed Account
Only show those delegates that have a timed account at the start of the current epoch.
{ stakes( query: { delegate: "B62..." timing: { timed_in_epoch: true } } ) { public_key balance timing { cliff_amount cliff_time initial_minimum_balance vesting_increment vesting_period untimed_slot timed_in_epoch timed_epoch_end } }}Balances and total count of delegators
You can retrieve the total amount delegated and total number of delegators to a staking pool.
{ stake(query: {public_key: "B62qpge4uMq4Vv5Rvc8Gw9qSquUYd6xoW1pz7HQkMSHm6h1o7pvLPAN"}) { delegationTotals { countDelegates totalDelegated } }}