4 October 2026 upgrade: account-local and optional aggregate margin fields,
plus the new post-only TIF response names below, apply after the scheduled upgrade.
Account snapshots retain
margin; they do not expose internal SDK metrics
or aggregate objects.Subscribe
Single Account
Multiple Accounts (Batched)
Subscribe to multiple accounts in a single request:Response
user(String or Array): User public key(s) in base58 format- Single:
"user": "9J8T..." - Multiple:
"user": ["9J8T...", "5Am6...", "ABC..."]
- Single:
Initial Snapshot
On subscription, you receive a unifiedaccountSnapshot message. The example below shows selected fields. For master and sub accounts, positions and openOrders include implicit per-instrument isolated-account rows tagged by iso=true:
Account Snapshot Fields
Top-level:
Margin:
Unprefixed margin fields describe the subscribed account only. When it has
attached isolated accounts,
aggTotalMargin, aggAvailableMargin,
aggExecutionImpact, aggTransferableBalance, aggMarginUsed,
aggBufferedMargin, aggNotional, aggRealizedPnl, aggUnrealizedPnl,
aggFees, and aggFunding report the account-plus-isolated totals. They are
omitted when no isolated owners are attached. Separate sub-accounts are not
included. Do not add local values to aggregate values.
Positions and orders continue to include isolated rows. See the
HTTP account examples
for the same margin object in a fullAccount response.
Positions:
Open Orders:
Leverage Settings (included in initial snapshot only):
Fee Tiers (included in initial snapshot only):
Pending OnFill (included in initial snapshot only):
Real-time Delta Updates
After the initial snapshot, you receive delta updates for changes:Margin Update
transfer, createSubAccount (when seeded with margin), and removeSubAccount trigger same-tick margin recompute on touched accounts. WS delivery is asynchronous, so the post acknowledgment can arrive before the marginUpdate is broadcast.marginUpdate carries account-local margin fields directly in data, unlike
the initial snapshot’s nested data.margin. For a parent with attached isolated
accounts, the current API suppresses incremental parent marginUpdate messages;
read the combined local and agg* values from accountSnapshot.margin or
POST /account instead. Do not depend on a parent margin delta after every ISO fill.
Illustrative partial account snapshot, not a margin delta:
Position Update
Locked Amounts Update
Emitted when transfer or withdrawal margin locks change. An empty array means all locks have cleared.Order Update
All order state changes are delivered via unified
orderUpdate messages with full state information.Order Update Fields
Trigger Metadata
Whentrigger is present (conditional orders):
Order Status Values
Order Update Examples
Legacy order messages: For backwards compatibility,
order messages with status: "placed" or status: "cancelled" may still be emitted alongside orderUpdate. New integrations should use orderUpdate messages exclusively.Fill Update
Emitted on each trade execution (in addition toorderUpdate):
tradeId- Opaque network-local execution ID (<slot>:<event-sequence>). Maker, taker, isolated-account, and REST account-history views of the same execution share it. Gaps are normal in one account’s view; it is not portable across forks or networks.symbol- Market symbolorderId- Your order ID for this rowprice- Execution pricesize- Executed sizefee- Effective fee for this rowisBuy-trueif taker bought,falseif taker soldreasonCode- Fill reason code (0=normal,1=liquidation,2=adl,3=liquidation_sweep)reason- Optional reason label (non-normal only;liquidation,adl, orliquidation_sweep)counterpartyHint- Short counterparty key hint (xxxx..yyyy)timestamp- Fill timestamp (nanoseconds)maker-trueif this row is the maker side
Liquidation Event
Emitted when the account is liquidated:ADL (Auto-Deleveraging) Event
Emitted when the account is auto-deleveraged:Cancel Rejected
Emitted when a single-order cancel is rejected (e.g. order not found):Cancel All Rejected
Emitted when cancel-all is rejected (e.g. no open orders):Leverage Update
Fee Tier Update
Emitted when the account’s fee tier changes:Update Frequency
- Initial Snapshot: Sent immediately on subscription (single unified
accountSnapshotmessage). - Event-driven: Margin, positions, and leverage settings are sent when they change.
- Real-time: Immediately on all order state changes (
orderUpdate), including:- Order placement (placed, resting)
- Partial fills (working)
- Full fills (filled)
- Cancellations (cancelled, cancelledRiskLimit, cancelledIoc, etc.)
- Rejections (rejectedCrossing, rejectedRiskLimit, etc.)