Skip to main content

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
HTTPTypical causes
400Validation failure: bad side, malformed UUID, sub-min_qty, non-tick-aligned price, unknown candles interval.
401Auth missing/invalid (when auth lands).
403Resource owned by another user.
404Unknown order_id / withdrawal_id / symbol.
409idempotency_key collision.
422Insufficient balance.
500DB error or unexpected failure.
502Downstream service unreachable (matching engine, bridge, funding scheduler).
503Trading service down.
504Downstream gRPC timeout.

FAPI

HTTP/1.1 422 Unprocessable Entity
content-type: application/json

{ "code": -2010, "msg": "Account has insufficient balance for requested action." }
HTTPcodemsg
500-1000An unknown error occurred while processing the request.
401-1021Timestamp for this request is outside of the recvWindow.
401-1022Signature for this request is not valid.
400-1100Illegal characters in parameter (also: unknown symbol, invalid side, unsupported type).
400-1102Mandatory parameter missing/empty (also: missing signature).
422-2010Insufficient balance.
422-2011Order does not exist.
400-2014API-key format invalid.
401-2015Invalid API-key / IP / permissions.

Common pitfalls

  • -1021 — your clock is drifty. Run date -u to check. Fix NTP rather than enlarging recvWindow.
  • -1022 — wrong secret, parameter-order mismatch, or missing signature= prefix. Validate against the canonical signing vector.
  • -2010 — available USDC < required notional / LEVERAGE_V1. Check balance.
  • -2011 on a fresh order — race (placed → instantly filled → queried). Treat as "already done."