Skip to Content
VPerpDocs

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 StatusMeaningTypical Cause & Action
200 OKRequest processedOn POST /exchange, still check status: "ok" and every item inside response.data.statuses
307 Temporary RedirectArchive handoffRequested timestamp predates the hot API node's 30-day rolling window; follow Location to the archive node
400 Bad RequestMalformed parametersUnknown type, invalid hex address, negative/malformed timestamp (startTime > endTime), or missing required field
413 Payload Too LargeBody limit exceededRequest exceeds 64 KiB (POST /info), 1 MiB (POST /exchange), or 4 MiB (/tx/batch)
422 Unprocessable EntitySchema / decode errorJSON structure failed strict canonical schema or signature parsing; inspect plain-text body
429 Too Many RequestsEdge IP rate limitedExceeded 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 UnavailableHeavy concurrency capExceeded 16 global / 4 per-IP heavy read slots or node overload; retry with jitter

2. Order Lifecycle Statuses (orderStatus & orderUpdates)

StatusMeaning
openResting on the CLOB (includes live partial-fill progress updates with cumulative avgPx and remaining sz)
filledFully executed across one or more fills
canceledCancelled by user (cancel, cancelByCloid, cancelAll, scheduleCancel, massQuote replace) or STP
triggeredConditional Mark-Price trigger fired and submitted its child order to the matching engine
rejectedOrder failed admission checks (invalid tick/lot, below 10 USDC min notional, PostOnlyRejected, price band, or insufficient margin)
MarginCanceledResting 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)
unknownOidTop-level orderStatus response when oid or cloid does not exist on-chain or in hot history

3. Common Rejection Messages & Exact Fixes

Rejection / Error TextRoot CauseHow 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 IMReduce size, deposit/transfer USDC (usdClassTransfer), cancel unneeded resting orders, or increase leverage
PostOnlyRejected / ALO crosses bookAn Alo order's limit price would match immediately against the opposing best bid/askRe-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 laneWait 10 s for slow lane, generate traded volume (+1 weight / USDC), or call reserveRequestWeight (0.0005 USDC / unit)
Invalid price / Invalid sizePrice violates 5 sig figs or 6 - szDecimals (perp) / 8 - szDecimals (spot), or size is not a multiple of 10^-szDecimals, or string has trailing zerosFormat without trailing zeros ("98420.5" not "98420.50"); check meta.universe szDecimals
Order notional below minimumTradeable notional < 10 USDC on a non-closing orderIncrease size so qty × tradeable_px >= 10 USDC (full-position reduceOnly closes are exempt)
v layout / v chain / bad signatureWrong source ("oc" vs "oc-test"), wrong vperpChain, mismatched signatureChainId, non-canonical trailing zeros, or high-ss ECDSAMatch environment parameters exactly in Authentication & Signing; normalize ECDSA to EIP-2 low-ss
bad nonceNonce is 0, reused, outside [block_time - 2d, block_time + 1d], or <= the lowest nonce in the 100-item sliding windowUse current Unix ms timestamp; keep concurrency within 100 unique nonces per signer
pq auth requiredSubmitted a legacy secp256k1 signature for an account that has been locked via BindPqLock or is NativePqOnlySign with FIPS 204 ml-dsa-44 (signature.scheme = "ml-dsa-44") or an authorized PQ Agent
oracleStale / Reduce-only marketMarket oracle has not updated within stale_after_ms (default 10 s); opening orders paused for safetyOnly risk-reducing orders are accepted until fresh oracle quotes resume (check exchangeStatus)
TP/SL orders must be reduce-onlySubmitted a perpetual trigger order with "r": falseSet "r": true on all perpetual TP/SL triggers
last-price TP/SL / trailing / scale orders are disabledSubmitted an order type disabled under V1 write scopeUse 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 1Reach 100,000 USDC cumulative volume (unlocks 2 sub-accounts) or qualify for VIP 1 (> 50k assets / 25k MMV)
referrer must be set before tradingAttempted setReferrer after already executing a fillReferral 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 KiB non-post / > 1 MiB post).
  • {"channel": "lagged"}: Your client fell more than 4,096 blocks behind the server stream. Immediately re-fetch authoritative state via POST /info (l2Book, clearinghouseState, openOrders) and resume processing live deltas from the new height.
  • Keepalive: Send {"method": "ping"} every 20–30 seconds; connections idle for 300 s or stalling writes for 5 s are closed cleanly.

On this page