developers:apiv2:accounts

This is an old revision of the document!


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
}

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.

Messages and every field: proto/t4/v2/account/account.proto. See the Message Catalog.

  • developers/apiv2/accounts.1788817914.txt.gz
  • Last modified: 2026/09/07 21:51
  • by chad