Skip to main content

Balances

Before trading, you need to know how much you can trade. Pass the account resource name (firms/{firmId}/accounts/{accountId}) you resolved from Account in each request.


Get account balance

POST /api/v1/get_account_balance

Returns the balance for a given currency in the account.

Key response: balance fields per currency; see spec for structure and precision.

Example request body:

{
"name": "firms/{firmId}/accounts/{accountId}",
"currency": "USD"
}

List account balances

POST /api/v1/list_account_balances

Returns all currency balances in the account. Use with list account positions to see available balance and size orders within risk limits.

Key response: balances keyed by currency.

Example request body:

{
"name": "firms/{firmId}/accounts/{accountId}"
}

Account balance subscription

POST /api/v1/create_account_balance_subscription — stream (application/x-ndjson)

Subscribe to currency balance snapshots and updates for the session. Key stream messages: snapshot then update (and optional heartbeat) per spec.

Example request body (optional accounts; omit or empty for all accounts you may view):

{
"accounts": ["firms/{firmId}/accounts/{accountId}"]
}

Full request/response shapes: Trader API spec (low-latency).