Accounts

Get balance for account

Changed on

Get the balance for an account by asset.

get/v2/accounts/{accountId}/balances/{asset}

Request

  • Base URL
    https://api.cdp.coinbase.com/platform
  • Auth
    HTTP bearer

Path parameters

accountId, string required

The ID of the Account, which is a UUID prefixed by the string account_.

Example:account_af2937b0-9846-4fe7-bfe9-ccc22d935114

The unique identifier of the account.

asset, string required

The symbol of the asset (e.g., eth, usd, usdc, usdt).

Example:usd

The symbol of the asset.

Response

Successfully got balance.

Balance required

A balance of an asset.

asset, BalancesAsset required

An asset, e.g. fiat or crypto.

amount, object required

Amount details denominated in different assets.

  • The keys represent the asset symbols (e.g., "btc", "usd"), - Each value contains available and total amounts. - There will always be an entry for the asset specified in the asset field.

Example response

{
  "asset": {
    "symbol": "btc",
    "type": "crypto",
    "name": "Bitcoin",
    "decimals": 8
  },
  "amount": {
    "btc": {
      "available": "2.5",
      "total": "3.0"
    },
    "usd": {
      "available": "252705.4",
      "total": "303246.48"
    }
  }
}

Changes

    • warning

      added the new policy_not_applicable enum value to the errorType response property for the response status

    • warning

      added the new policy_not_applicable enum value to the errorType response property for the response status

    • warning

      added the new policy_not_applicable enum value to the errorType response property for the response status

    2 more changes in this revision