developers:apiv2:accounts

Account Feed

◀ WebSocket API (V2)

Subscribe to one or more accounts to receive their balances, positions, P&L and order status in real time.

You must subscribe to an account before routing orders into it.
You can auto-subscribe all accounts for your user with a single message.

Send AccountSubscribe to subscribe an account, or all accounts:

account_subscribe {
  subscribe: ACCOUNT_SUBSCRIBE_TYPE_ALL_UPDATES
  account_id: ["ACCT1", "ACCT2"]     // or set subscribe_all_accounts: true
  upl_mode:  UPL_MODE_AVERAGE        // optional
}

Note: UPLMode allows you to save bandwidth by turning off real-time UP&L calculation and message delivery. (UP&L is updated in real-time as the market moves.)

Value You receive
UPL_MODE_NONE Turns off UP&L calculation and message delivery
UPL_MODE_AVERAGE Computes UP&L as the average open price compared to the current market

The server replies with AccountSubscribeResponse, followed by one or more AccountSnapshot messages if the subscription was successful.

On subscribe you receive an AccountSnapshot — the current state as a bundle of messages: AccountDetails, AccountUpdate, AccountPosition, AccountCurrency, MarketDetails, and open-order OrderUpdate messages.

After the snapshot, update messages stream in real-time:

Message Carries
AccountUpdate Balance, margin (day/full/pre-trade), P&L rollups.
AccountPosition Per-market position: buys/sells, open volume, average price, margin.
AccountProfit Account-level UPL / RPL, working-order totals, alerting flags.
AccountPositionProfit Per-position UPL / RPL (incl. USD-converted).
OrderUpdate Order status updates — see Order Routing.
OrderTrade Order fills.
  • developers/apiv2/accounts.txt
  • Last modified: 2026/09/07 21:57
  • by chad