Get account info

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

GET

/extended/v1/address/{principal}

Retrieves the account data for a given account or contract identifier, where the balance is the hex encoding of a unsigned 128-bit integer (big-endian), the nonce is an unsigned 64-bit integer, and the proofs are provided as hex strings.

For non-existent accounts, this does not return a 404 error. Rather it returns an object with a balance and nonce of 0.

Path parameters

principal
Required
string

Stacks address or a contract identifier

Example: "SP31DA6FTSJX2WGTZ69SFY11BH51NZMB0ZW97B5P0"

Query parameters

proofinteger

Returns object without the proof field if set to 0

tipstring

The Stacks chain tip to query from

Status codeDescription
200Success
Terminal
curl -X GET "https://api.mainnet.hiro.so/v2/accounts/SP31DA6FTSJX2WGTZ69SFY11BH51NZMB0ZW97B5P0"

GET request for account data

Example response
{
  "balance": "string",
  "locked": "string",
  "unlock_height": 0,
  "nonce": 0,
  "balance_proof": "string",
  "nonce_proof": "string"
}