Get STX user balances

Retrieves the STX token balance for a specified address or contract identifier.

GET

/extended/v1/address/{principal}/stx

Retrieves STX token balance for a given Address or Contract Identifier.

Path Parameters

principal
Required
string

Stacks address or a Contract identifier.

Example: "SP31DA6FTSJX2WGTZ69SFY11BH51NZMB0ZW97B5P0"

Query Parameters

unanchoredboolean

Include transaction data from unanchored (i.e. unconfirmed) microblocks.

Example: trueDefault: false

until_blockstring

returned data representing the state up until that point in time, rather than the current block. Note - Use either of the query parameters but not both at a time.

Example: 60000
Status codeDescription
200Success
Terminal
curl -L \
  "https://api.mainnet.hiro.so/extended/v1/address/SP31DA6FTSJX2WGTZ69SFY11BH51NZMB0ZW97B5P0/stx" \
  -H 'Accept: application/json'

GET request that returns address balances

Example Response
{
  "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,
  "token_offering_locked": {
    "total_locked": "string",
    "total_unlocked": "string",
    "unlock_schedule": [
      {
        "amount": "string",
        "block_height": 0
      }
    ]
  }
}

Last updated on