Skip to main content

Errors

Errors arrive in the standard envelope with a machine-readable error.code. Switch on the code, not the message.

Standard codes

CodeHTTPWhen
invalid_request400Validation failure — missing field, wrong type, out-of-range
invalid_json400Body wasn't parseable JSON
unauthorized401Missing or invalid Authorization header
forbidden403Authenticated, but this credential can't perform the action
account_not_active403The account's state forbids it
account_trade_frozen403Account is trade_frozen
not_found404Resource doesn't exist (or belongs to another account)
instrument_halted409Instrument is not in trading state
stp_aborted409Self-trade prevention blocked the order
payload_too_large413Body exceeded the 64 KiB cap
insufficient_funds422Available collateral can't cover the order's hold
fok_would_not_fully_fill422FOK order can't fill in full against the current book
max_cost_blocks_any_fill422Market BUY whose max_cost blocks all offered liquidity
market_no_liquidity422Market order has no counterparty
internal_error500Unexpected server-side failure — report the correlation_id
service_unavailable503A required downstream is unreachable — retry with backoff
engine_timeout504Engine didn't ack within the deadline — treat outcome as unknown

Parameter-parse failures use specific codes of the form invalid_order_id, invalid_instrument_id, invalid_credential_id, invalid_resolution.

Retry semantics

  • 400/401/403/404/409/413/422 — deterministic; retrying the same request will fail the same way. Fix the request.
  • 503 — retry with exponential backoff and jitter.
  • 504 (engine_timeout) — the outcome is unknown: the order may or may not have been accepted. Reconcile via GET /v1/orders before re-placing; blind retries can double-place.

Operation-specific reject reasons (order rejects, cancel rejects) are documented on each endpoint's reference page.