Skip to main content

Liquidation updates

Real-time liquidation and risk state updates. Requires authentication.

Pushed when the account's risk state changes — including transitions to and from Normal, MarginCall, Liquidation, and AutoDeleveraging. Each message is self-contained with full margin data, so clients do not need to correlate with the margin channel.

Subscribe

{"op": "subscribe", "args": ["liquidations"]}

Topic format: liquidations (per-account, not per-symbol).

Update Message

{
"channel": "liquidations",
"type": "update",
"customer_code": "c1d2e3f4-a5b6-7890-cdef-123456789abc",
"currency": "USD",
"risk_state": "MarginCall",
"total_equity": "52430.50",
"available_margin": "-1200.00",
"used_margin": "53630.50",
"margin_ratio": "1.0229",
"unrealised_pnl": "-8500.00",
"margin_deficit": "4800.00",
"leverage_ratio": "15.20",
"timestamp": "2025-06-15T07:30:00.123Z"
}
FieldDescription
customer_codeCustomer identifier
currencyAccount denomination currency
risk_stateNormal, MarginCall, Liquidation, or AutoDeleveraging
total_equityTotal account equity (balance + unrealised PnL)
available_marginMargin available for new positions (can be negative)
used_marginMargin currently used by open positions and orders
margin_ratioUsed margin as a fraction of total equity
unrealised_pnlTotal unrealised profit/loss across all positions
margin_deficitAmount needed to restore initial margin (null when Normal)
leverage_ratioAccount leverage ratio (null if not applicable)
timestampServer-side event time

Notes:

  • There is no initial snapshot on subscribe — use REST for current risk state.
  • Includes all risk state transitions, including back to Normal, so clients can clear alerts.