This is an old revision of the document!
Account Feed
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 — order submissions for an unsubscribed account are rejected. See Order Routing.
Subscribe
Send AccountSubscribe:
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 (success, errors[]).
Snapshot, then updates
On subscribe you receive an AccountSnapshot — the current state as a bundle of messages: AccountDetails, AccountUpdate, AccountPosition, AccountCurrency, MarketDetails, and open-order OrderUpdates. (A position's MarketDetails is always sent before the position.)
After the snapshot, individual messages stream as things change:
| 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). |
AccountCurrency | Currency conversion rates. |
OrderUpdate | Order status/fills for the account — see Order Routing. |
Reference
Messages and every field: proto/t4/v2/account/account.proto. See the Message Catalog.