Home

Get an Account's Unspent Coins

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

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Get an array of all unspent coins for an AccountIdentifier and the BlockIdentifier at which the lookup was performed. If your implementation does not support coins (i.e. it is for an account-based blockchain), you do not need to implement this endpoint. If you implementation does support coins (i.e. it is fro a UTXO-based blockchain), you MUST also complete the /account/balance endpoint. It is important to note that making a coins request for an account without populating the SubAccountIdentifier should not result in the coins of all possible SubAccountIdentifiers being returned. Rather, it should result in the coins pertaining to no SubAccountIdentifiers being returned. To get all coins associated with an account, it may be necessary to perform multiple coin requests with unique AccountIdentifiers. Optionally, an implementation may choose to support updating an AccountIdentifier's unspent coins based on the contents of the mempool. Note, using this functionality breaks any guarantee of idempotency.

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

include_mempoolboolean

Include state from the mempool when looking up an account's unspent coins. Note, using this functionality breaks any guarantee of idempotency.

currenciesArray<Currency>

In some cases, the caller may not want to retrieve coins for all currencies for an AccountIdentifier. If the currencies field is populated, only coins for the specified currencies will be returned. If not populated, all unspent coins 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 accountCoins.

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.