Get account info
Retrieves the account data for a given account or contract identifier.
GET
/v2/accounts/{principal}
Get account info
Get the account data for the provided principal
Where balance is the hex encoding of a unsigned 128-bit integer (big-endian), nonce is a unsigned 64-bit integer, and the proofs are provided as hex strings.
For non-existent accounts, this does not 404, rather it returns an object with balance and nonce of 0.
Path Parameters
principal
Requiredstring
Stacks address or a Contract identifier (e.g. SP31DA6FTSJX2WGTZ69SFY11BH51NZMB0ZW97B5P0.get-info
)
Query Parameters
proof
integer
Returns object without the proof field if set to 0
tip
string
The Stacks chain tip to query from. If tip == latest, the query will be run from the latest known tip (includes unconfirmed state).
Status code | Description |
---|---|
200 | Success |
curl -X GET "http://localhost:20443/v2/accounts/string?proof=0&tip=string"
GET request for account data
{
"balance": "string",
"locked": "string",
"unlock_height": 0,
"nonce": 0,
"balance_proof": "string",
"nonce_proof": "string"
}