Skip to main content
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

Parameters:
  • user (String or Array): User public key(s) in base58 format
    • Single: "user": "9J8T..."
    • Multiple: "user": ["9J8T...", "5Am6...", "ABC..."]

Initial Snapshot

On subscription, you receive a unified accountSnapshot 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:
This example omits the other account snapshot fields for brevity.

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.
origSz and sz are signed: negative values indicate sell-side intent. For example, a sell order for 0.25 BTC has origSz: -0.25. For ot: "trigger" baskets, origSz and sz are 0 (trigger baskets carry nested actions, not a direct sized order).

Order Update Fields

Trigger Metadata

When trigger 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 to orderUpdate):
Fill Fields:
  • 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 symbol
  • orderId - Your order ID for this row
  • price - Execution price
  • size - Executed size
  • fee - Effective fee for this row
  • isBuy - true if taker bought, false if taker sold
  • reasonCode - Fill reason code (0=normal, 1=liquidation, 2=adl, 3=liquidation_sweep)
  • reason - Optional reason label (non-normal only; liquidation, adl, or liquidation_sweep)
  • counterpartyHint - Short counterparty key hint (xxxx..yyyy)
  • timestamp - Fill timestamp (nanoseconds)
  • maker - true if 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:
For historical liquidation / ADL analysis, query POST /account with type: "riskHistory".

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 accountSnapshot message).
  • 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.)

Example: Monitor Account


Unsubscribe