Accounts
GET /explorer/account/{address}
The account endpoint provides information about the most recent state of accounts and smart contracts. Baker accounts and delegator accounts contain additional state information. Use meta
(boolean) to embed optional metadata. See the table below for details.
- Schema
- Response
- Example
Field | Description |
---|---|
row_id int64 | Internal database id. |
address hash | Account address as base58-check encoded string. |
address_type enum | Account address type ed25519 (tz1), secp256k1 (tz2), p256 (tz3), contract (KT1) or blinded (btz1). |
pubkey hash | Revealed public key. |
counter int64 | The account's most recent relay protection counter seen in ops. |
baker hash | Current baker (may be self when registered as baker), omitted when not delegating. |
creator hash | Creator account of a smart contract account. |
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. Omitted when not delegating. |
first_in_time datetime | Block time of first incoming transaction. |
first_out_time datetime | Block time of first outgoing transaction. |
last_in_time datetime | Block time of latest incoming transaction. |
last_out_time datetime | Block time of latest outgoing transaction. |
first_seen_time datetime | Block time of account creation. |
last_seen_time datetime | Block time of last activity. |
delegated_since_time datetime | Block time of most recent delegation. Omitted when not delegating. |
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. |
total_fees_used money | Lifetime fees accrued in tx sent by others. |
unclaimed_balance money | Currently unclaimed balance (for vesting contracts and commitments). |
spendable_balance money | Currently spendable balance. |
frozen_rollup_bond money | Currently frozen bond for all unsettled rollup commitments. |
lost_rollup_bond money | Bond slashed for refuted rollup commitments. |
staked_balance money | Amount staked (and slashable) with the current baker. |
unstaked_balance money | Amount unstaked (and still slashable). |
frozen_rewards money | Calculated current rewards earned from staking which auto-compound with stake. |
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 currently stakes. |
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 and received. |
n_tx_failed int64 | Lifetime total number of operations sent that failed. |
n_tx_out int64 | Lifetime total number of transactions sent. |
n_tx_in int64 | Lifetime total number of transactions received. |
metadata object | Embedded account metadata if available. Requires meta=1 argument. |
{
"row_id": 302042,
"address": "tz1Z7eWGw18LqUgRqmDqNZFQx7f8GEHXRfT8",
"address_type": "ed25519",
"pubkey": "edpkudvMBDoh5mStcMEs6LC4GvTL6WQCvqCg4naMhcyYMGSJfamLy5",
"counter": 1757333,
"first_in": 533980,
"first_out": 535803,
"last_in": 5020320,
"last_out": 5020262,
"first_seen": 533980,
"last_seen": 5020320,
"first_in_time": "2019-07-23T19:11:46Z",
"first_out_time": "2019-07-25T02:43:09Z",
"last_in_time": "2024-01-31T14:34:14Z",
"last_out_time": "2024-01-31T14:19:44Z",
"first_seen_time": "2019-07-23T19:11:46Z",
"last_seen_time": "2024-01-31T14:34:14Z",
"total_received": 294555520.189467,
"total_sent": 292695943.485905,
"total_burned": 3265.63475,
"total_fees_paid": 101.31532,
"total_fees_used": 74.805461,
"spendable_balance": 1856209.753492,
"staked_balance": 0,
"unstaked_balance": 0,
"frozen_rewards": 0,
"lost_stake": 0,
"is_funded": true,
"is_delegated": false,
"is_staked": false,
"is_revealed": true,
"n_tx_success": 71243,
"n_tx_failed": 14,
"n_tx_out": 71243,
"n_tx_in": 52599
"metadata": {
"tz1Z7eWGw18LqUgRqmDqNZFQx7f8GEHXRfT8": {
"address":"tz1Z7eWGw18LqUgRqmDqNZFQx7f8GEHXRfT8",
"alias":{
"name": "Coinbase 1",
"kind": "exchange",
"logo": "coinbase.png"
},
"location": {
"country": "US"
},
"social": {
"twitter": "coinbase"
}
}
}
}
curl https://api.tzpro.io/explorer/account/tz1Z7eWGw18LqUgRqmDqNZFQx7f8GEHXRfT8
import (
"context"
"github.com/trilitech/tzpro-go/tzpro"
"github.com/trilitech/tzgo/tezos"
)
// get account data and embed metadata if available
a, err := tzpro.DefaultClient.Account.Get(
context.Background(),
tezos.MustParseAddress("tz1Z7eWGw18LqUgRqmDqNZFQx7f8GEHXRfT8"),
tzpro.WithMeta(),
)
List Account Operations​
GET /explorer/account/{address}/operations
Lists operations sent from and to an account (defaults to all types and ascending order). This endpoint supports pagination with cursor
or offset
and limit
. Use type
to filter for a specific operation type (e.g. transaction
).
To query for updates after a certain block use the optional argument since
(int64|hash) or simply use cursor
. Using block hash has the advantage that the query is reorg-aware, i.e. it throws a 409 error when the specified block has become orphan.
To change the order of returned operations use the optional order
(asc|desc) parameter. Use meta
(boolean) to add optional account metadata.
Example​
curl "https://api.tzpro.io/explorer/account/tz1Z7eWGw18LqUgRqmDqNZFQx7f8GEHXRfT8/operations?limit=100&order=desc"
import (
"context"
"github.com/trilitech/tzpro-go/tzpro"
"github.com/trilitech/tzgo/tezos"
)
// list operations sent and received by this account
ops, err := tzpro.DefaultClient.Account.ListOps(
context.Background(),
tezos.MustParseAddress("tz1Z7eWGw18LqUgRqmDqNZFQx7f8GEHXRfT8"),
tzpro.WithLimit(100),
)
List Deployed Contracts​
GET /explorer/account/{address}/contracts
Lists all smart contracts this account has deployed.
Example​
curl "https://api.tzpro.io/explorer/account/tz1UBZUkXpKGhYsP5KtzDNqLLchwF4uHrGjw/contracts"
import (
"context"
"github.com/trilitech/tzpro-go/tzpro"
"github.com/trilitech/tzgo/tezos"
)
// list deployed contracts
contracts, err := tzpro.DefaultClient.Account.ListContracts(
context.Background(),
tezos.MustParseAddress("tz1UBZUkXpKGhYsP5KtzDNqLLchwF4uHrGjw"),
tzpro.NoQuery,
)