Home

Get an Account's Balance

POST
https://ada.nownodes.io/account/balance

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Get an array of all AccountBalances for an AccountIdentifier and the BlockIdentifier at which the balance lookup was performed. The BlockIdentifier must always be returned because some consumers of account balance data need to know specifically at which block the balance was calculated to compare balances they compute from operations with the balance returned by the node. It is important to note that making a balance request for an account without populating the SubAccountIdentifier should not result in the balance of all possible SubAccountIdentifiers being returned. Rather, it should result in the balance pertaining to no SubAccountIdentifiers being returned (sometimes called the liquid balance). To get all balances associated with an account, it may be necessary to perform multiple balance requests with unique AccountIdentifiers. It is also possible to perform a historical balance lookup (if the server supports it) by passing in an optional BlockIdentifier.

Body

application/json

Request value.

network_identifierNetworkIdentifierrequired

Rosetta network identifier object.

Show child attributes
blockchainstringrequired

Blockchain value.

networkstringrequired

If a blockchain has a specific chain-id or network identifier, it should go in this field. It is up to the client to determine which network-specific identifier is mainnet, preprod, or preview.

sub_network_identifierSubNetworkIdentifier

Sub Network Identifier value.

Show child attributes
networkstringrequired

Network value.

metadataobject

Additional metadata object.

account_identifierAccountIdentifierrequired

Rosetta account identifier object.

Show child attributes
addressstringrequired

The address may be a cryptographic public key (or some encoding of it) or a provided username.

sub_accountSubAccountIdentifier

Sub Account value.

Show child attributes
addressstringrequired

The SubAccount address may be a cryptographic value or some other identifier (ex: bonded) that uniquely specifies a SubAccount.

metadataobject

If the SubAccount address is not sufficient to uniquely specify a SubAccount, any other identifying information can be stored here. It is important to note that two SubAccounts with identical addresses but differing metadata will not be considered equal by clients.

metadataobject

Blockchains that utilize a username model (where the address is not a derivative of a cryptographic public key) should specify the public key(s) owned by the address in metadata.

Show child attributes
chain_codestring

Hex string encoded extension of bip32 private and public keys with an extra 256 bits of entropy that consists of 32 bytes

block_identifierPartialBlockIdentifier

Rosetta block identifier object.

Show child attributes
indexinteger<int64>

Cardano block height or Rosetta index.

hashstring

Cardano transaction hash.

currenciesArray<Currency>

In some cases, the caller may not want to retrieve all available balances for an AccountIdentifier. If the currencies field is populated, only balances for the specified currencies will be returned. If not populated, all available balances will be returned.

Show child attributes
symbolstringrequired

Canonical symbol associated with a currency.

decimalsinteger<int32>>= 0required

Number of decimal places in the standard unit representation of the amount. For example, BTC has 8 decimals. Note that it is not possible to represent the value of some currency in atomic units that is not base 10.

metadataany

Additional metadata object.

Response

200OK

HTTP 200 response for accountBalance.

400Bad Request

Bad Request. The request is malformed or contains invalid parameters.

401Unauthorized

Unauthorized: API key is present but rejected by the NOWNodes gateway.

422Unprocessable Entity

Missing API key. The NOWNodes gateway returns plain text for this error.

500Internal Server Error

Internal Server Error. The gateway or backend failed while processing the request.