Get account info

RPC node

Retrieves the account data for a given account or contract identifier.

GET

Parameters

Path Parameters

principal
REQUIRED
string Stacks address (28-41 characters) or a Contract identifier in format `{address}.{contract_name}` (e.g. `SP31DA6FTSJX2WGTZ69SFY11BH51NZMB0ZW97B5P0.get-info`). Contract names have a maximum length of 40 characters for new contracts. Legacy contracts may have names up to 128 characters.

Query Parameters

proof
integer Controls MARF proof inclusion in response. Set to 1 (default) to include proof, 0 to exclude. Invalid values default to 0 (no proof).
tip
string Stacks chain tip to query from. Options: - (empty/omitted): Use latest anchored tip (canonical confirmed state) - `latest`: Use latest known tip including unconfirmed microblocks - `{block_id}`: Use specific block ID (64 hex characters)
Status codeDescription
200Success
400Bad request
404Not found
500Internal Server Error
cURL
curl -L \
"https://api.hiro.so/v2/accounts/{principal}?proof={proof}&tip={tip}" \
-H 'Accept: application/json'
Response
{
"balance": "0x0000000000000000000000000007a120",
"locked": "0x0000000000000000000000000007a120",
"unlock_height": 126,
"nonce": 2867,
"balance_proof": "0xabce",
"nonce_proof": "0xabcd"
}

How is this guide?