Margin Call
Real-time warnings when your cross margin gets close to liquidation.
Use this stream to react before a CROSS position is liquidated: add funds, reduce or close positions. Warnings are sent only for CROSS margin. ISOLATED positions have their own liquidation price (lq) and get no margin calls.
Endpoint
wss://futures-trading-service.outpoll.com/ws/margin-callAuthentication
Send an API-key-signed AUTH as the first message, within 5 seconds; sign ts + "GET" + "/ws/margin-call". See Futures Account → Authentication.
{
"t": "AUTH",
"d": {
"key": "your-api-key",
"ts": "1790835600",
"sig": "signature"
}
}The server replies {"t":"AUTH","d":{"ok":true}}.
Message Envelope
type
string
Always MARGIN_CALL
positions
array
Your open CROSS positions at risk; omitted if the list is empty
Message Types
AUTH
Client → Server
Authenticate with your API key (first message)
AUTH
Server → Client
Authentication acknowledgement {"ok": true}
ping
Client → Server
Plain-text keep-alive
pong
Server → Client
Plain-text answer to ping
MARGIN_CALL
Server → Client
Your cross margin is close to liquidation
There is no subscribe message: after AUTH you receive every margin call of your account.
When It Is Sent
Cross margin is evaluated per settlement coin: all your open CROSS positions settled in the same coin share one margin pool. The pool's risk is checked about every 3 seconds while its pairs' mark prices move, and is measured as how far the pool is on the way to liquidation (100% = liquidation).
A margin call is sent when the pool rises into a warning level. By default the levels are 75%, 90% and 97% of the way to liquidation.
While the pool stays in the same level, the margin call is repeated at most once per 60 seconds.
When the pool falls back below the lowest level, the warning resets: the next rise sends a new margin call.
A margin call is also sent right before liquidation of the pool starts, unless one was just sent.
The message does not carry the level. Check your margin over REST when it arrives.
MARGIN_CALL Payload
positions[] item:
id
string
Position ID (UUID); matches id on the Account stream and in Get Open Positions
symbol
string
Pair name, e.g. BTCUSDT
side
string
LONG or SHORT
positions lists every open CROSS position of the pool at risk, not only the losing ones.
Heartbeat
Send the plain text ping every 20–30 seconds; the server replies pong. Both are plain text, not JSON.
Errors
No error messages are sent. Authentication failures close the connection with code 1008 (auth required). Other messages are ignored.
Reconnect
Margin calls are not stored or replayed. A margin call that fires while you are disconnected is lost; after reconnecting you get the next one (repeats come at most every 60 seconds while the pool stays at risk). Reconnect with exponential backoff and jitter.
Python Example
Was this helpful?

