Skip to main content
GET
Get aggregated balances

Authorizations

x-api-key
string
header
default:lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663
required

API key of the application. Only valid together with the x-user-key header — the pair is an alternative to OAuth bearer authentication, never sent alongside it. The pair is granted the same permissions the operation's OAuth scopes describe.

Demo credential for trying the API from these docs: lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663

x-user-key
string
header
default:eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_
required

User-specific authentication key. Only valid together with the x-api-key header — the pair is an alternative to OAuth bearer authentication, never sent alongside it.

Demo credential for trying the API from these docs: eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_

Headers

x-request-id
string<uuid>
required

A unique request identifier.

Example:

"e2f76893-3d08-408d-9887-94b69c2048af"

Query Parameters

accountTypes
string

Optional comma-separated list of account types to include. Valid values: Trading, Cash, Options, Crypto, MoneyFarm, Spaceship (case-insensitive). Unrecognised values are silently ignored rather than rejected: if none of the supplied values are recognised the filter is dropped and all account types are returned, so verify the accountType values in the response rather than assuming the filter applied.

displayCurrency
string
default:USD

ISO 4217 currency code for totals and conversions. Defaults to USD.

includeZeroBalances
boolean
default:false

Whether to include accounts with a zero balance in the response. Defaults to false.

includeSubAccounts
boolean
default:false

Whether to also include the user's sub-account Trading balances. Only effective when Trading is in scope — that is, when no accountTypes filter is supplied, or the filter includes trading. Sub-account entries are returned with accountType Trading and subType "subAccount". Defaults to false.

expand
string

Comma-separated list of optional sections to include in the response. Valid values: equityDetails.

Response

Aggregated balances retrieved successfully.

Aggregated balances for the authenticated user.

gcid
integer<int64>

The user's global customer ID.

totalBalance
number<double>

Sum of every included account's balance, converted to the requested display currency. Treat this as portfolio value, not spendable cash: for Trading, Options, MoneyFarm and Spaceship it is the total account value including invested positions, and for Crypto it is the fiat value of holdings. For Trading specifically it equals equityDetails.available + equityDetails.totalUsedMargin + equityDetails.currentPNL, so it includes margin deployed in open positions and unrealized profit and loss — the available portion can be a small fraction of it. Only for Cash accounts does it equal available cash. Do not use it to decide whether a trade or withdrawal is affordable — request expand=equityDetails and read equityDetails.available (Trading, Options, MoneyFarm, Cash) or equityDetails.spendableBalanceInFiat (Crypto). Spaceship accounts expose no spendable figure. Note that equityDetails amounts are denominated in each account's own native currency, not in displayCurrency, so they must be converted before being compared with displayBalance or totalBalance.

displayCurrency
string | null

ISO 4217 currency code used for totalBalance and displayBalance values.

balances
object[] | null

Individual account balances.