Error Codes
Two error envelopes — Web v1 plain text, FAPI Standard JSON. Pick the table that matches the surface you're calling.
Web v1
HTTP/1.1 400 Bad Request
content-type: text/plain
side must be BUY or SELL
| HTTP | Typical causes |
|---|---|
400 | Validation failure: bad side, malformed UUID, sub-min_qty, non-tick-aligned price, unknown candles interval. |
401 | Auth missing/invalid (when auth lands). |
403 | Resource owned by another user. |
404 | Unknown order_id / withdrawal_id / symbol. |
409 | idempotency_key collision. |
422 | Insufficient balance. |
500 | DB error or unexpected failure. |
502 | Downstream service unreachable (matching engine, bridge, funding scheduler). |
503 | Trading service down. |
504 | Downstream gRPC timeout. |
FAPI
HTTP/1.1 422 Unprocessable Entity
content-type: application/json
{ "code": -2010, "msg": "Account has insufficient balance for requested action." }
| HTTP | code | msg |
|---|---|---|
500 | -1000 | An unknown error occurred while processing the request. |
401 | -1021 | Timestamp for this request is outside of the recvWindow. |
401 | -1022 | Signature for this request is not valid. |
400 | -1100 | Illegal characters in parameter (also: unknown symbol, invalid side, unsupported type). |
400 | -1102 | Mandatory parameter missing/empty (also: missing signature). |
422 | -2010 | Insufficient balance. |
422 | -2011 | Order does not exist. |
400 | -2014 | API-key format invalid. |
401 | -2015 | Invalid API-key / IP / permissions. |
Common pitfalls
-1021— your clock is drifty. Rundate -uto check. Fix NTP rather than enlargingrecvWindow.-1022— wrong secret, parameter-order mismatch, or missingsignature=prefix. Validate against the canonical signing vector.-2010— available USDC < requirednotional / LEVERAGE_V1. Check balance.-2011on a fresh order — race (placed → instantly filled → queried). Treat as "already done."