Accounts Table
GET /tables/account?args
List information about the most recent state of implicit and smart contract accounts.
- Schema
- Response
- Example
Field | Description |
---|---|
row_id uint64 | Unique row identifier. |
address hash | Account address. |
address_type enum | Account address type ed25519 (tz1), secp256k1 (tz2), p256 (tz3), contract (KT1), rollup (txr1) or blinded (btz1). |
pubkey hash | Revealed public key. |
counter int64 | Replay protection counter for ops signed. |
first_in int64 | Block height of first incoming transaction. |
first_out int64 | Block height of first outgoing transaction. |
last_in int64 | Block height of latest incoming transaction. |
last_out int64 | Block height of latest outgoing transaction. |
first_seen int64 | Block height of account creation. |
last_seen int64 | Block height of last activity. |
delegated_since int64 | Block height of most recent delegation. |
total_received money | Lifetime total tokens received in transactions. |
total_sent money | Lifetime total tokens sent in transactions. |
total_burned money | Lifetime total tokens burned. |
total_fees_paid money | Lifetime fees paid. |
total_fees_used money | Lifetime fees consumed in calls where this account was receiver. |
unclaimed_balance money | Currently unclaimed balance (for vesting contracts and commitments). |
spendable_balance money | Currently spendable balance. |
frozen_rollup_bond money | Total rollup bond currently frozen. |
lost_rollup_bond money | Total rollup bond lost due to slashing. |
staked_balance money | Amount staked (and slashable) with the current baker. |
unstaked_balance money | Amount unstaked (and still slashable). |
lost_stake money | Total stake lost in baker slashing. |
is_funded bool | Flag indicating the account is funded. |
is_activated bool | Flag indicating the account was activated from a commitment. |
is_delegated bool | Flag indicating the account is currently delegated. |
is_staked bool | Flag indicating the account is staker. |
is_revealed bool | Flag indicating the account has a revealed public key. |
is_baker bool | Flag indicating the account is a registered baker. |
is_contract bool | Flag indicating the account is a smart contract. |
n_tx_success int64 | Lifetime total number of operations sent. |
n_tx_failed int64 | Lifetime total number of operations failed. |
n_tx_out int64 | Lifetime total number of transactions sent. |
n_tx_in int64 | Lifetime total number of transactions received. |
baker hash | Account baker address. |
creator hash | Account creator address. |
first_seen_time datetime | Block time of account creation. |
last_seen_time datetime | Block time of last activity. |
first_in_time datetime | Block time of first incoming transaction. |
last_in_time datetime | Block time of latest incoming transaction. |
first_out_time datetime | Block time of first outgoing transaction. |
last_out_time datetime | Block time of latest outgoing transaction. |
delegated_since_time datetime | Block time of most recent delegation. |
[
[
43215, // row_id
"tz1VQnqCCqX4K5sP3FNkVSNKTdCAMJDd3E1n", // address
"ed25519", // address_type
"edpku4Jnsyp9geSL3W4xEwGhtTDjbM89Q7RyG43fftxzR3Cs4YY6K7", // pubkey
255108, // counter
52876, // first_in
53964, // first_out
5020725, // last_in
5005921, // last_out
52876, // first_seen
5020745, // last_seen
0, // delegated_since
5784848.692858, // total_received
5375391.578273, // total_sent
3.895000, // total_burned
153.146508, // total_fees_paid
0.130318, // total_fees_used
0.000000, // unclaimed_balance
1597525.894799, // spendable_balance
0.000000, // frozen_rollup_bond
0.000000, // lost_rollup_bond
0.000000, // staked_balance
0.000000, // unstaked_balance
0.000000, // lost_stake
1, // is_funded
0, // is_activated
0, // is_delegated
0, // is_staked
1, // is_revealed
1, // is_baker
0, // is_contract
192230, // n_tx_success
110, // n_tx_failed
115, // n_tx_out
192230, // n_tx_in
"tz1VQnqCCqX4K5sP3FNkVSNKTdCAMJDd3E1n", // baker
null, // creator
1533752917000, // first_seen_time
1706718029000, // last_seen_time
1533752917000, // first_in_time
1706717729000, // last_in_time
1533823255000, // first_out_time
1706491920000, // last_out_time
0 // delegated_since_time
]
]
curl "https://api.tzpro.io/tables/account?address=tz2TSvNTh2epDMhZHrw73nV9piBX7kLZ9K9m"
import (
"context"
"github.com/trilitech/tzpro-go/tzpro"
)
// create a new query object
q := tzpro.DefaultClient.Account.NewQuery()
// add filters and configure the query
q.WithFilter(tzpro.FilterModeEqual, "address", "tz2TSvNTh2epDMhZHrw73nV9piBX7kLZ9K9m").
WithLimit(1000).
WithColumns("row_id", "address", "spendable_balance")
// execute the query
list, err := q.Run(context.Background())
// walk accounts
for _, acc := range list.Rows {
// access regular Account structs
}