Bakers
GET /explorer/bakers
Get a list of all active bakers, their current status and affiliation metadata. Optionally filter by status and country or get a random list of suggestions for a given account. This endpoint represents a simple to use listing feature for wallets and other dapps that want to enable delegation.
- Filters
- Schema
- Events
- Stats
- Response
- Example
Filter the baker list by the following criteria
Argument | Description |
---|---|
status enum | Filter by baker status public , private , closing , closed . |
country enum | Filter by baker country of operation (use ISO 3166-1 Alpha-2 country codes, that's two uppercase letters like US, DE, FR) |
suggest address | Return a suggested list of bakers for the given address (see below) |
cursor int | Last baker id after which to continue listing, use for paging. |
limit int | Max number of results to return (max 100). |
offset int | Skip first N results, use for paging instead of cursor. |
Field | Description |
---|---|
id int64 | Internal account id, use for cursor-based paging. |
address hash | Baker account address. |
consensus_key hash | Pubkey used for signing baking related transactions. Lima+ |
consensus_address hash | Address (pubkey hash) of the consensus key as present in block headers. Lima+ |
baker_since datetime | Time when baker registered. |
baker_until datetime | Optional time when baker went inactive. |
grace_period int64 | Cycle at which baker may get deactivated when not seen signing transactions by then. |
baker_version hex | Git hash of most recently seen baker software (octez includes the first 4 bytes of the Git hash into the block nonce). |
total_balance money | Currently spendable and frozen balances (except frozen rewards). |
spendable_balance money | Currently spendable balance. |
delegated_balance money | Sum of all current delegations. |
own_stake money | Currently frozen security deposit. |
total_stake money | Entire baker stake including foreign staker's stake. |
delegation_capacity money | Total available capacity for delegations (before over-delegation is triggered). |
staking_capacity money | Total available staking capacity (before over-staking is triggered). |
staking_edge money | Oxford+ staker vs baker reward share percentage. |
staking_limit money | Oxford+ max limit for staking == frozen deposits as set voluntarily by the baker. |
baking_power money | Stake and delegation amount actively used to gain rights (capped by stake amount, over-staking and over-delegation can go beyond). |
network_share float | Percentage of network-wide voting power for this baker. |
active_delegations int64 | Currently number of non-zero delegators. |
active_stakers int64 | Currently number of stakers. |
is_over_delegated bool | Flag indicating the baker has too much delegated balance which is not counted into baking power. |
is_over_staked bool | Flag indicating the baker has too much stake and overflow is counted against delegation thus lowering income. |
is_active bool | Flag indicating whether the baker is currently active, i.e. receiving rights for baking and endorsing blocks. |
events object | Activity hints |
stats object | Statistics |
metadata object | Baker metadata |
Field | Description |
---|---|
last_bake_height int64 | latest baked block height |
last_bake_block hash | latest baked block hash |
last_bake_time datetime | latest baked block timestamp |
last_endorse_height int64 | latest endorsed block height |
last_endorse_block hash | latest endorsed block hash |
last_endorse_time datetime | latest endorsed block timestamp |
next_bake_height int64 | next round 0 baking opportunity as block height |
next_bake_time datetime | next round 0 baking opportunity as estimated timestamp |
next_endorse_height int64 | next endorsing opportunity as block height |
next_endorse_time datetime | next endorsing opportunity as estimated timestamp |
Field | Description |
---|---|
total_rewards_earned money | Sum of lifetime rewards earned |
total_fees_earned money | Sum of lifetime fees earned |
total_lost money | Sum of lifetime losses due to punishments |
blocks_baked int64 | Sum of lifetime blocks baked |
blocks_proposed int64 | Sum of lifetime blocks proposed. Ithaca+ |
blocks_not_baked int64 | Sum of blocks not baked although rights existed |
blocks_endorsed int64 | Sum of blocks endorsed |
blocks_not_endorsed int64 | Sum of blocks not endorsed although rights existed |
slots_endorsed int64 | Sum of lifetime slots endorsed |
avg_luck_64 float | Average luck to get random priority zero baking/endorsing rights for the past 64 cycles (182 days, 6 months). |
avg_performance_64 float | Average reward generation performance for the past 64 cycles (182 days, 6 months). |
avg_contribution_64 float | Average utilization of rights to bake/endorse blocks for the past 64 cycles. |
n_baker_ops int64 | Number of baker operations sent. |
n_proposals int64 | Voting proposals sent. |
n_ballots int64 | Voting ballots sent |
n_endorsements int64 | Endorsements sent |
n_preendorsements int64 | Preendorsements sent Ithaca+ |
n_nonce_revelations int64 | Seed nonces and VDF revelations sent |
n_double_bakings int64 | Double baking punishments received |
n_double_endorsements int64 | Double (pre)endorsing punishments received |
n_accusations int64 | Number of double-bake/double-endorse ops sent as accuser |
n_set_limits int64 | Number of deposit limit changes |
n_update_consensus_key int64 | Number of consensus key changes |
n_drain_delegate int64 | Number of drain operations sent by an attacker |
{
"address": "tz1VQnqCCqX4K5sP3FNkVSNKTdCAMJDd3E1n",
"consensus_key": "edpku4Jnsyp9geSL3W4xEwGhtTDjbM89Q7RyG43fftxzR3Cs4YY6K7",
"consensus_address": "tz1VQnqCCqX4K5sP3FNkVSNKTdCAMJDd3E1n",
"baker_since": "2018-08-09T14:00:55Z",
"grace_period": 705,
"baker_version": "5a9b7130",
"total_balance": 5926554.134456,
"spendable_balance": 1597316.529645,
"delegated_balance": 36079725.196956,
"own_stake": 0,
"total_stake": 0,
"delegation_capacity": 59265541.34456,
"staking_capacity": 0,
"staking_edge": 0,
"staking_limit": 0,
"baking_power": 42006279331412,
"network_share": 0.06221,
"active_delegations": 5508,
"active_stakers": 0,
"is_over_delegated": false,
"is_over_staked": false,
"is_active": true,
"events": {
"last_bake_height": 5020379,
"last_bake_block": "BMFPYT9grKUd9YNA9EoRPaS9QaTwVg9fe6vPS14bTqosVmoyXeu",
"last_bake_time": "2024-01-31T14:48:59Z",
"last_endorse_height": 2244608,
"last_endorse_block": "BKw5Wy8Cr4E5K49UVjahqTZmZssxA5DH9bUZ1n9aLciWVBf3aL4",
"last_endorse_time": "2022-04-01T16:36:44Z",
"next_bake_height": 5020421,
"next_bake_time": "2024-01-31T14:59:29Z",
"next_endorse_height": 5020397,
"next_endorse_time": "2024-01-31T14:53:29Z"
},
"stats": {
"total_rewards_earned": 5649850.439748,
"total_fees_earned": 33929.808785,
"total_lost": 166526.187154,
"blocks_baked": 174697,
"blocks_proposed": 174636,
"blocks_not_baked": 186,
"blocks_endorsed": 3771358,
"blocks_not_endorsed": 8941,
"slots_endorsed": 919071748,
"avg_luck_64": 10269,
"avg_performance_64": 10008,
"avg_contribution_64": 9998,
"n_baker_ops": 3775049,
"n_proposals": 15,
"n_ballots": 27,
"n_endorsements": 3771358,
"n_preendorsements": 1341,
"n_nonce_revelations": 2301,
"n_double_bakings": 7,
"n_double_endorsements": 0,
"n_accusations": 0,
"n_set_limits": 0,
"n_update_consensus_key": 0,
"n_drain_delegate": 0
}
}
# bakers
curl "https://api.tzpro.io/explorer/bakers"
# votes
curl "https://api.tzpro.io/explorer/bakers/tz1aRoaRhSpRYvFdyvgWLL6TGyRoGF51wDjM/votes"
# endorsements
curl "https://api.tzpro.io/explorer/bakers/tz1aRoaRhSpRYvFdyvgWLL6TGyRoGF51wDjM/endorsements"
# delegations
curl "https://api.tzpro.io/explorer/bakers/tz1aRoaRhSpRYvFdyvgWLL6TGyRoGF51wDjM/delegations"
# income
curl "https://api.tzpro.io/explorer/bakers/tz1aRoaRhSpRYvFdyvgWLL6TGyRoGF51wDjM/income/400"
# rights
curl "https://api.tzpro.io/explorer/bakers/tz1aRoaRhSpRYvFdyvgWLL6TGyRoGF51wDjM/rights/400"
# snapshot
curl "https://api.tzpro.io/explorer/bakers/tz1aRoaRhSpRYvFdyvgWLL6TGyRoGF51wDjM/snapshot/400"
import (
"context"
"github.com/trilitech/tzpro-go/tzpro"
"github.com/trilitech/tzgo/tezos"
)
c := tzpro.DefaultClient
ctx := context.Background()
addr := tezos.MustParseAddress("tz3RDC3Jdn4j15J7bBHZd29EUee9gVB1CxD9")
// baker votes
votes, err := c.Baker.ListVotes(ctx, addr, tzpro.NoQuery)
// baker endorsements
endorsements, err := c.Baker.ListEndorsements(ctx, addr, tzpro.NoQuery)
// delegations
delegations, err := c.Baker.ListDelegations(ctx, addr, tzpro.NoQuery)
// baker income
income, err := c.Baker.GetIncome(ctx, addr, 400, tzpro.NoQuery)
// rights
rights, err := c.Baker.GetRights(ctx, addr, 400, tzpro.NoQuery)
// snapshot
snapshot, err := c.Baker.GetSnapshot(ctx, addr, 400, tzpro.NoQuery)
List Baker Votes​
GET /explorer/bakers/{address}/votes
Lists all voting proposals and ballots operations the baker has sent.
List Baker Endorsements​
GET /explorer/bakers/{address}/endorsements
Lists all endorsement operations the baker has sent.
List Baker Delegations​
GET /explorer/bakers/{address}/delegations
Lists all delegation operations where this baker was set or removed as the baker of choice for a delegator.
Get Baker Cycle Income​
GET /explorer/bakers/{address}/income/{cycle}
{
"cycle": 699,
"own_balance": 5889134.40471,
"delegated_balance": 37338619.598737,
"staking_balance": 43227754.003447,
"own_stake": 4413249.392354,
"n_delegations": 5511,
"n_stakers": 0,
"n_baking_rights": 1043,
"n_endorsing_rights": 7303911,
"luck": 664.812034,
"luck_percent": 10329,
"contribution_percent": 9207,
"performance_percent": 4575,
"n_blocks_baked": 965,
"n_blocks_proposed": 965,
"n_blocks_not_baked": 0,
"n_blocks_endorsed": 15091,
"n_blocks_not_endorsed": 0,
"n_slots_endorsed": 6726185,
"n_seeds_revealed": 0,
"expected_income": 20859.69036,
"total_income": 9541.717872,
"baking_income": 9513.466115,
"endorsing_income": 0,
"accusation_income": 0,
"seed_income": 0,
"fees_income": 28.251757,
"total_loss": 0,
"accusation_loss": 0,
"seed_loss": 0,
"endorsing_loss": 0,
"lost_accusation_fees": 0,
"lost_accusation_rewards": 0,
"lost_accusation_deposits": 0,
"lost_seed_fees": 0,
"lost_seed_rewards": 0
}
Get income statistics for this baker at the specific cycle. Past cycles are final. Future cycles are available as soon as a shapshot was selected.
Get Baker Cycle Rights​
GET /explorer/bakers/{address}/rights/{cycle}
Get rights for this baker at the specific cycle. Rights are represented as lists of binary flags.
{
"address": "tz1aRoaRhSpRYvFdyvgWLL6TGyRoGF51wDjM",
"cycle": 400,
"start_height": 1687553,
"baking_rights": "0000...0000",
"endorsing_rights": "ffff...ffff",
"blocks_baked": "00000...0000",
"blocks_endorsed": "fc1f...feef",
"seeds_required": "04000000020010040400102400000100",
"seeds_revealed": "04000000020010040400102400000100"
}
Get Baker Cycle Snapshot​
GET /explorer/bakers/{address}/snapshot/{cycle}
Get snapshot for this baker at the specific cycle. A snapshot contains info about staking status at the cycle's snapshot block as well as a list of delegators with their balances at that block. In combination with cycle income, this info can be used to prepare baker payouts.
{
"baking_cycle": 699,
"snapshot_height": 4912128,
"snapshot_cycle": 693,
"snapshot_time": "2024-01-12T14:16:49Z",
"snapshot_index": 4,
"staking_balance": 43227754003447,
"own_balance": 5889134404710,
"own_stake": 4413249392354,
"delegated_balance": 37338619598737,
"n_delegations": 5511,
"n_stakers": 0,
"expected_income": 20859690360,
"total_income": 9541717872,
"baking_income": 9513466115,
"endorsing_income": 0,
"accusation_income": 0,
"seed_income": 0,
"fees_income": 28251757,
"total_loss": 0,
"accusation_loss": 0,
"seed_loss": 0,
"endorsing_loss": 0,
"lost_accusation_fees": 0,
"lost_accusation_rewards": 0,
"lost_accusation_deposits": 0,
"lost_seed_fees": 0,
"lost_seed_rewards": 0,
"delegators": [{
"address": "tz1cgrzpsB43pBppH6mJzrHnFqxU8RUce991",
"balance": 5000000569919,
"is_funded": true
},
// ...
],
"stakers": [
// ...
]
}