Errors, Order Statuses & Troubleshooting
Complete reference for HTTP status codes, order lifecycle statuses, common rejection messages, and operational recovery playbooks.
Batch Semantics
HTTP 200 + statuses[]
Always inspect per-order statuses
Rate Limit Code
HTTP 429
Empty body · Backoff per bucket
Archive Redirect
HTTP 307
Queries older than 30d hot window
Key Takeaways
- HTTP 200 on POST /exchange confirms gateway acceptance—always inspect every element of response.data.statuses for resting, filled, or error.
- HTTP 429 means your IP exceeded either the Read bucket (1,200/min) or Write bucket (2,400/min); these two buckets are isolated so one never starves the other.
- HTTP 307 on historical POST /info queries is normal when requesting data older than 30 days—follow the redirect to the archive node.
1. HTTP Status Codes
| HTTP Status | Meaning | Typical Cause & Action |
|---|---|---|
200 OK | Request processed | On POST /exchange, still check status: "ok" and every item inside response.data.statuses |
307 Temporary Redirect | Archive handoff | Requested timestamp predates the hot API node's 30-day rolling window; follow Location to the archive node |
400 Bad Request | Malformed parameters | Unknown type, invalid hex address, negative/malformed timestamp (startTime > endTime), or missing required field |
413 Payload Too Large | Body limit exceeded | Request exceeds 64 KiB (POST /info), 1 MiB (POST /exchange), or 4 MiB (/tx/batch) |
422 Unprocessable Entity | Schema / decode error | JSON structure failed strict canonical schema or signature parsing; inspect plain-text body |
429 Too Many Requests | Edge IP rate limited | Exceeded Read (1,200/min), Write (2,400/min), WS new-conn (30/min), or general HTTP (100 req/s) bucket. Back off exponentially |
503 Service Unavailable | Heavy concurrency cap | Exceeded 16 global / 4 per-IP heavy read slots or node overload; retry with jitter |
2. Order Lifecycle Statuses (orderStatus & orderUpdates)
| Status | Meaning |
|---|---|
open | Resting on the CLOB (includes live partial-fill progress updates with cumulative avgPx and remaining sz) |
filled | Fully executed across one or more fills |
canceled | Cancelled by user (cancel, cancelByCloid, cancelAll, scheduleCancel, massQuote replace) or STP |
triggered | Conditional Mark-Price trigger fired and submitted its child order to the matching engine |
rejected | Order failed admission checks (invalid tick/lot, below 10 USDC min notional, PostOnlyRejected, price band, or insufficient margin) |
MarginCanceled | Resting Maker order cancelled cleanly during matching because live equity could no longer cover IM + live fee rate (e.g., after adverse price move or UTC 00:00 VIP downgrade) |
unknownOid | Top-level orderStatus response when oid or cloid does not exist on-chain or in hot history |
3. Common Rejection Messages & Exact Fixes
| Rejection / Error Text | Root Cause | How to Fix |
|---|---|---|
Insufficient margin to place order. | Account free equity (after deducting unsettled hourly funding, open_im, and undiscounted base + Builder Fee) cannot cover required IM | Reduce size, deposit/transfer USDC (usdClassTransfer), cancel unneeded resting orders, or increase leverage |
PostOnlyRejected / ALO crosses book | An Alo order's limit price would match immediately against the opposing best bid/ask | Re-quote passively behind BBO (bids < best_ask, asks > best_bid) |
Too many requests. Please wait a few seconds. | Account exhausted its independent Plan B AddrLimit (nRequestsUsed >= nRequestsCap) and is inside the 10 s slow lane | Wait 10 s for slow lane, generate traded volume (+1 weight / USDC), or call reserveRequestWeight (0.0005 USDC / unit) |
Invalid price / Invalid size | Price violates 5 sig figs or 6 - szDecimals (perp) / 8 - szDecimals (spot), or size is not a multiple of 10^-szDecimals, or string has trailing zeros | Format without trailing zeros ("98420.5" not "98420.50"); check meta.universe szDecimals |
Order notional below minimum | Tradeable notional < 10 USDC on a non-closing order | Increase size so qty × tradeable_px >= 10 USDC (full-position reduceOnly closes are exempt) |
v layout / v chain / bad signature | Wrong source ("oc" vs "oc-test"), wrong vperpChain, mismatched signatureChainId, non-canonical trailing zeros, or high- ECDSA | Match environment parameters exactly in Authentication & Signing; normalize ECDSA to EIP-2 low- |
bad nonce | Nonce is 0, reused, outside [block_time - 2d, block_time + 1d], or <= the lowest nonce in the 100-item sliding window | Use current Unix ms timestamp; keep concurrency within 100 unique nonces per signer |
pq auth required | Submitted a legacy secp256k1 signature for an account that has been locked via BindPqLock or is NativePqOnly | Sign with FIPS 204 ml-dsa-44 (signature.scheme = "ml-dsa-44") or an authorized PQ Agent |
oracleStale / Reduce-only market | Market oracle has not updated within stale_after_ms (default 10 s); opening orders paused for safety | Only risk-reducing orders are accepted until fresh oracle quotes resume (check exchangeStatus) |
TP/SL orders must be reduce-only | Submitted a perpetual trigger order with "r": false | Set "r": true on all perpetual TP/SL triggers |
last-price TP/SL / trailing / scale orders are disabled | Submitted an order type disabled under V1 write scope | Use Mark-Price TP/SL triggers or batch limit orders (order up to 256 legs) |
Cannot create sub-accounts until enough volume traded. | VIP 0 account has < 100,000 USDC cumulative volume and < VIP 1 | Reach 100,000 USDC cumulative volume (unlocks 2 sub-accounts) or qualify for VIP 1 (> 50k assets / 25k MMV) |
referrer must be set before trading | Attempted setReferrer after already executing a fill | Referral bindings must occur before an account's first trade |
4. WebSocket Error & Reconnect Playbook
{"channel": "error", "data": "..."}: Returned when exceeding per-IP WebSocket message rate (4,000/min), subscription limit (1,000), unique users (16), or sending an invalid frame (> 16 KiBnon-post /> 1 MiBpost).{"channel": "lagged"}: Your client fell more than 4,096 blocks behind the server stream. Immediately re-fetch authoritative state viaPOST /info(l2Book,clearinghouseState,openOrders) and resume processing live deltas from the new height.- Keepalive: Send
{"method": "ping"}every 20–30 seconds; connections idle for300 sor stalling writes for5 sare closed cleanly.