Snapshot Table
GET /tables/snapshot?args
List network-wide staking status across all bakers and delegators at snapshot blocks. this table contains all snapshots regardless of them being later chosen as cycle snapshot or not.
- Schema
- Response
- Example
| Field | Description | 
|---|---|
| row_iduint64 | Unique row identifier. | 
| heightint64 | Block height of this snapshot. | 
| cycleint64 | Cycle of this snapshot. | 
| timedatetime | Block time of this snapshot. | 
| indexint64 | Snapshot index in the cycle [0..15]. | 
| own_stakemoney | (baker only) Amount of stake owned by the baker. | 
| staking_balancemoney | (baker only) Total amount of staked plus delegated (uncapped, may be over-delegated or over-staked). | 
| account_iduint64 | Unique row_id of the account this snapshot relates to. | 
| baker_iduint64 | Unique row_id of the baker this account delegates to. | 
| is_bakerbool | Flag indicating the current account is a baker. | 
| is_activebool | Flag indicating the current account is an active baker. | 
| balancemoney | Account spendable balance. | 
| delegatedmoney | (baker-only) Total delegated balance. | 
| n_delegationsint64 | (baker-only) Incoming number of non-zero delegations. | 
| n_stakersint64 | (baker-only) Number of stakers. | 
| sinceint64 | (delegator-only) Block height at which this delegation was created. | 
| addresshash | Account address. | 
| bakerhash | Account delegate address. | 
| since_timedatetime | (delegator-only) Timestamp when this delegation was created. | 
[
  [
    77603856,                               // row_id
    4858880,                                // height
    690,                                    // cycle
    1704259861000,                          // time
    0,                                      // index
    4411411.932779,                         // own_stake
    44132493.923541,                        // staking_balance
    43215,                                  // account_id
    43215,                                  // baker_id
    1,                                      // is_baker
    1,                                      // is_active
    5870034.494243,                         // balance
    38262459.429298,                        // delegated
    5504,                                   // n_delegations
    0,                                      // n_stakers
    53964,                                  // since
    "tz1VQnqCCqX4K5sP3FNkVSNKTdCAMJDd3E1n", // address
    "tz1VQnqCCqX4K5sP3FNkVSNKTdCAMJDd3E1n", // baker
    1533823255000                           // since_time
  ]
]
curl "https://api.tzpro.io/tables/snapshot?address=tz2TSvNTh2epDMhZHrw73nV9piBX7kLZ9K9m&cycle=150&is_selected=1&limit=1"
import (
  "context"
  "github.com/trilitech/tzpro-go/tzpro"
)
// create a new query object
q := tzpro.DefaultClient.Baker.NewSnapshotQuery()
// add filters and configure the query
q.WithFilter(tzpro.FilterModeEqual, "address", "tz2TSvNTh2epDMhZHrw73nV9piBX7kLZ9K9m").
  WithFilter(tzpro.FilterModeEqual, "cycle", 150).
  WithFilter(tzpro.FilterModeEqual, "is_selected", true).
  Limit(1)
// execute the query
list, err := q.Run(context.Background())
// process rows
if _, snapshot := range list.Rows {
}