Get account info

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

GET
/v2/accounts/{principal}

Get account info

Retrieves the account data for a given Account or a Contract Identifier

Where balance is the hex encoding of a unsigned 128-bit integer (big-endian), 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 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
/v2/accounts/{principal}

curl -X GET "https://api.hiro.so/v2/accounts/SP31DA6FTSJX2WGTZ69SFY11BH51NZMB0ZW97B5P0?proof=0&tip=string"

GET request for account data

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