List account balances
Changed onReturns a list of account and token balances on the network. The latest balance information is returned when there is no timestamp query parameter, otherwise, the information is retrieved from snapshots with 15-minute granularity. This information is limited to at most 50 token balances per account as outlined in HIP-367. As such, it's not recommended for general use and we instead recommend using either /api/v1/accounts/{id}/tokens or /api/v1/tokens/{id}/balances to obtain the current token balance information and /api/v1/accounts/{id} to return the current account balance.
Request
- Base URL(relative, and the document was published on a file host, not at the API’s origin)
- URL/api/v1/balances
- Authnone declared
Query parameters
Account id or account alias with no shard realm or evm address with no shard realm
The optional balance value to compare against
The account's public key to compare against
The maximum number of items to return
The order in which items are listed
The consensus timestamp as a Unix timestamp in seconds.nanoseconds format with an optional comparison operator. See unixtimestamp.com for a simple way to convert a date to the 'seconds' part of the Unix time.
Response
OK
Example response
{
"timestamp": "1586567700.453054000",
"balances": [
{
"account": "0.15.10",
"balance": 80,
"tokens": [
{
"token_id": "0.0.200001",
"balance": 8
}
]
}
]
}Changes
- warning
changed the pattern of the
queryrequest parameteraccount.balancefrom^((gte?|lte?|eq|ne)\:)?\d{1,10}$to^((gte?|lte?|eq|ne)\:)?\d{1,19}$
- warning
- breaking
the response property
///became nullable for the status - breaking
the response property
///became nullable for the status - breaking
the response property
//became nullable for the status - breaking
the response property
////became nullable for the status - breaking
the response property
/became nullable for the status - breaking
the response property
became nullable for the status
- breaking