v4

latestOpenAPI 3.0.02026-08-04103181301.4 KB
portfolio

Get Balance

Endpoint for getting the balance and portfolio value of a member. By default the returned balance is the primary account's available balance. Pass a non-zero subaccount to fetch that subaccount's balance on a specific exchange index instead (exchange_index, defaulting to 0). When subaccount is omitted or 0, exchange_index has no effect. This endpoint also accepts API keys with the 'read::portfolio_balance' scope.

get/portfolio/balance

Query parameters

subaccountinteger

Subaccount number (0 for primary, 1-63 for subaccounts). Defaults to 0.

exchange_indexinteger

Identifier for an exchange shard. Defaults to 0 if unspecified.

Exchange index to read the subaccount balance from, paired with a non-zero subaccount. Defaults to 0. Ignored when subaccount is omitted or 0.

Response

Balance retrieved successfully

balanceinteger required

Member's available balance in cents. This represents the amount available for trading.

balance_dollarsstring required

US dollar amount as a fixed-point decimal string with up to 6 decimal places of precision. This is the maximum supported precision; valid quote intervals for a given market are constrained by that market's price level structure.

portfolio_valueinteger required

Member's portfolio value in cents. This is the current value of all positions held.

updated_tsinteger required

Unix timestamp of the last update to the balance.

Example response

{
  "balance_dollars": "0.5600",
  "balance_breakdown": [
    {
      "balance": "0.5600"
    }
  ]
}