---
title: "Get an Account's Unspent Coins"
method: POST
path: "/account/coins"
tags: ["Account"]
---

# Get an Account's Unspent Coins

`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 — unresolved $ref
  - `account_identifier` AccountIdentifier, required — unresolved $ref
  - `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` 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. — unresolved $ref

## 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 — unresolved $ref
  - `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. — unresolved $ref
  - `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

## Changes

> 50 revisions in range; 1 could not be searched.

- **2020-11-05** `87e8c6124c30` — 1 info
  - added the new optional request property `currencies`
- **2020-11-05** `63d02055c20c` — 1 info
  - endpoint added
- **2020-08-07** `97f3c6540212` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/coinbase/apis/rosetta/changes/account/coins/post.md)

---

[API](https://skmtc.dev/coinbase/apis/rosetta.md) · [All operations](https://skmtc.dev/coinbase/apis/rosetta/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/coinbase/rosetta/revisions/758497aacc08/schema)
