DELETE /order, DELETE /orders, or DELETE /cancel-all, one of these four paths is the cause.
1. Heartbeat sweep (opt-in)
POSTing/heartbeats or /v1/heartbeats with valid L2 HMAC auth opts your user into a safety net: subsequent heartbeats must arrive within 30 seconds of each other, or every open order owned by your user is cancelled.
2. Balance rebalance
When the on-chain indexer reports a balance drop — a USDC withdrawal, an AMM trade, or a fill on another venue — the engine cancels enough resting orders to keep your remaining exposure within your new balance. Cancellation order is LIFO (newest first), so your oldest resting orders are most likely to survive a rebalance. The combined/ws channel emits an orders_rebalanced frame:
/ws/user channel, each affected order appears as a separate order/CANCELLATION frame.
3. Market lifecycle terminal transition
When a market transitions toResolved, Voided, or Closed — see Market lifecycle — every open order in that market is cancelled atomically with the status change.
Paused is not in this set. Pausing freezes matching but retains resting orders; the market can resume to Active later.
WebSocket signature:
/ws/user— oneorder/CANCELLATIONframe per cancelled order, fanned out per user.- Combined
/ws— the bundledmarket_status_changedframe withcancelled_orders > 0.
4. GTD expiry sweep
Orders placed withorderType: "GTD" carry a signed expiration (Unix seconds). A background sweeper ticks every ~10 seconds, finds GTD orders past their expiration, and cancels them.
- WebSocket signature:
order/CANCELLATIONon/ws/user(ororder_cancelledon combined/ws), with a reason flag indicating expiry. - Typical cancel latency after the deadline: under 10 seconds.
Summary
If you see unexplained cancellations, this is the order to check: heartbeat status first (most common SDK footgun), then balance changes, then market status, then expirations.