Account Table
GET https://api.tzpro.io/tables/account?args
List information about the most recent state of implicit and smart contract accounts.
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. |
baker_id uint64 | Unique row_id of the baker this account delegates to. If same as row_id, this is a baker account. |
creator_id uint64 | Contract creator unique row_id. |
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 in tez. |
total_fees_paid money | Lifetime fees paid in tez. |
unclaimed_balance money | Currently unclaimed balance (for vesting contracts and commitments). |
spendable_balance money | Currently spendable balance. |
frozen_bond money | Total rollup bond currently frozen. |
lost_bond money | Total rollup bond lost due to 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_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. |
| |
curl "https://api.tzpro.io/tables/account?address=tz2TSvNTh2epDMhZHrw73nV9piBX7kLZ9K9m"
import (
"context"
"blockwatch.cc/tzstats-go"
)
// create a new query object
q := tzstats.DefaultClient.NewAccountQuery()
// add filters and configure the query
q.WithFilter(tzstats.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
}
[
[
278469, // row_id
"tz2TSvNTh2epDMhZHrw73nV9piBX7kLZ9K9m", // address
"secp256k1", // address_type
"sppk7bn9MKAWDUFwqowcxA1zJgp12yn2kEnMQJP3WmqSZ4W8WQhLqJN" // pubkey
12345, // counter
278469, // baker_id
0, // creator_id
360996, // first_in
360997, // first_out
633203, // last_in
633203, // last_out
360996, // first_seen
633203, // last_seen
0, // delegated_since
4129917.992000, // total_received
1241985.094354, // total_sent
0.000000, // total_burned
0.041097, // total_fees_paid
0.000000, // unclaimed_balance
253038.498372, // spendable_balance
0, // frozen_bond
0, // lost_bond
1, // is_funded
0, // is_activated
0, // is_delegated
1, // is_revealed
1, // is_delegate
1, // is_active_delegate
0, // is_contract
103002, // n_tx_success
0, // n_tx_failed
38, // n_tx_out
2, // n_tx_in
"tz2TSvNTh2epDMhZHrw73nV9piBX7kLZ9K9m", // baker
null, // creator
1553123452000, // first_seen_time
1570032391000, // last_seen_time
1553123452000, // first_in_time
1570032391000, // last_in_time
1553123512000, // first_out_time
]
]
Last modified 1mo ago