Skip to main content
All error responses share the same envelope:
{
  "code": "insufficient_funds",
  "message": "overdraft on 0xabc.../USDC (lock): Δavail=-100, Δlock=100",
  "details": { ... }
}

HTTP status code conventions

StatusMeaningExample
200Success — but check code field for business rejectsUser tried to trade more than their balance
201Resource createdWithdrawal request accepted
400Client error — malformed requestMissing field, invalid address
401UnauthenticatedMissing / malformed / revoked / expired X-Api-Key (see api_key_* codes)
403ForbiddenBanned wallet or API-key scope missing (api_key_scope_missing)
404Not foundOrder doesn’t exist
409Conflict — valid request, wrong stateMarket not OPEN
429Rate limitedExceeded per-wallet quota
503Service unavailableMatcher down

Business rejects vs HTTP errors

For endpoints that return a full response envelope (order, withdrawal), a business reject returns HTTP 200 with status: 'REJECTED':
{
  "orderId": "",
  "status": "REJECTED",
  "filledQty": "0",
  "remainingQty": "0",
  "trades": [],
  "code": "insufficient_funds",
  "message": "overdraft ..."
}
Look at code to distinguish success from reject within a 200.

Error codes

Complete code reference across all endpoints.