Get user balances
Retrieves account balance information, including STX, fungible, and non-fungible tokens.
GET
/extended/v1/address/{principal}/balances
Get account balances
Retrieves total account balance information for a given Address or Contract Identifier. This includes the balances of STX Tokens, Fungible Tokens and Non-Fungible Tokens for the account.
Path Parameters
principal
Requiredstring
Stacks address or a Contract identifier
Example:"SP31DA6FTSJX2WGTZ69SFY11BH51NZMB0ZW97B5P0"
Query Parameters
unanchored
boolean
Include transaction data from unanchored (i.e. unconfirmed) microblocks
Example:true
Default: false
until_block
string
returned data representing the state up until that point in time, rather than the current block.
Example:60000
Status code | Description |
---|---|
| Success |
Terminal
$curl -X GET "https://api.hiro.so/extended/v1/address/SP31DA6FTSJX2WGTZ69SFY11BH51NZMB0ZW97B5P0/balances?unanchored=true&until_block=60000"
GET request that returns address balances
{"stx": {"balance": "string","total_sent": "string","total_received": "string","total_fees_sent": "string","total_miner_rewards_received": "string","lock_tx_id": "string","locked": "string","lock_height": 0,"burnchain_lock_height": 0,"burnchain_unlock_height": 0},"fungible_tokens": {"property1": {"balance": "string","total_sent": "string","total_received": "string"},"property2": {"balance": "string","total_sent": "string","total_received": "string"}},"non_fungible_tokens": {"property1": {"count": "string","total_sent": "string","total_received": "string"},"property2": {"count": "string","total_sent": "string","total_received": "string"}},"token_offering_locked": {"total_locked": "string","total_unlocked": "string","unlock_schedule": [{"amount": "string","block_height": 0}]}}