---
title: "getAccountCoins"
method: POST
path: "/account/coins"
tags: ["Cardano - Rosetta"]
---

# getAccountCoins

`POST /account/coins`

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.

## Request body

- AccountCoinsRequest — AccountCoinsRequest is utilized to make a request on the /account/coins endpoint.
  - `network_identifier` NetworkIdentifier, required — The network_identifier specifies which network a particular object is associated with.
    - `blockchain` string, required
    - `network` string, required — 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 or testnet.
    - `sub_network_identifier` SubNetworkIdentifier — In blockchains with sharded state, the SubNetworkIdentifier is required to query some object on a specific shard. This identifier is optional for all non-sharded blockchains.
      - `network` string, required
      - `metadata` object
  - `account_identifier` AccountIdentifier, required — The account_identifier uniquely identifies an account within a network. All fields in the account_identifier are utilized to determine this uniqueness (including the metadata field, if populated).
    - `address` string, required — The address may be a cryptographic public key (or some encoding of it) or a provided username.
    - `sub_account` SubAccountIdentifier — An account may have state specific to a contract address (ERC-20 token) and/or a stake (delegated balance). The sub_account_identifier should specify which state (if applicable) an account instantiation refers to.
      - `address` string, required — The SubAccount address may be a cryptographic value or some other identifier (ex: bonded) that uniquely specifies a SubAccount.
      - `metadata` object — 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.
    - `metadata` object — 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.
  - `include_mempool` boolean, required — Include state from the mempool when looking up an account's unspent coins. Note, using this functionality breaks any guarantee of idempotency.
  - `currencies` RpcCurrency[] — 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.
    - `symbol` string, required — Canonical symbol associated with a currency.
    - `decimals` integer, required — 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.
    - `metadata` object — Any additional information related to the currency itself. For example, it would be useful to populate this object with the contract address of an ERC-20 token.

## Response `200`

Expected response to a valid request

- AccountCoinsResponse — AccountCoinsResponse is returned on the /account/coins endpoint and includes all unspent Coins owned by an AccountIdentifier.
  - `block_identifier` BlockIdentifier, required — The block_identifier uniquely identifies a block in a particular network.
    - `index` integer, required — This is also known as the block height.
    - `hash` string, required — This should be normalized according to the case specified in the block_hash_case network options.
  - `coins` Coin[], required — If a blockchain is UTXO-based, all unspent Coins owned by an account_identifier should be returned alongside the balance. It is highly recommended to populate this field so that users of the Rosetta API implementation don't need to maintain their own indexer to track their UTXOs.
    - `coin_identifier` CoinIdentifier, required — CoinIdentifier uniquely identifies a Coin.
      - `identifier` string, required — Identifier should be populated with a globally unique identifier of a Coin. In Bitcoin, this identifier would be transaction_hash:index.
    - `amount` Amount, required — Amount is some Value of a Currency. It is considered invalid to specify a Value without a Currency.
      - `value` string, required — Value of the transaction in atomic units represented as an arbitrary-sized signed integer. For example, 1 BTC would be represented by a value of 100000000.
      - `currency` RpcCurrency, required — Currency is composed of a canonical Symbol and Decimals. This Decimals value is used to convert an Amount.Value from atomic units (Satoshis) to standard units (Bitcoins).
        - `symbol` string, required — Canonical symbol associated with a currency.
        - `decimals` integer, required — 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.
        - `metadata` object — Any additional information related to the currency itself. For example, it would be useful to populate this object with the contract address of an ERC-20 token.
      - `metadata` object
  - `metadata` object — Account-based blockchains that utilize a nonce or sequence number should include that number in the metadata. This number could be unique to the identifier or global across the account address.

## Other responses

- `500` — unexpected error

---

[API](https://skmtc.net/tatum/apis/blockchain-data.md) · [All operations](https://skmtc.net/tatum/apis/blockchain-data/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tatum/blockchain-data/versions/8622ee4b8fae/schema)
