API Reference / Errors

Errors

Every error response shares one shape (a business error body, not the framework's default validation body):

{
  "error": "machine-readable code, e.g. auth_required",
  "message": "human-readable text (nullable)",
  "recoverable": true
}

recoverable=true is safe to retry with backoff; false (invariant_violation with a 500, for example) means internal state is inconsistent and trading is paused — do not retry.

The two meanings of 404 (the semantics that matter most)

A query carrying minCursor (and the order status query) can return 404 either because the projection has not caught up with the cursor you passed, or because the resource genuinely does not exist. The response bodies are byte-for-byte identical (a fixed literal market_not_found, guaranteed structurally). Querying right after a 202 will most likely 404 first: poll with the same cursor; do not treat the first 404 as terminal.

Status codes & retry matrix

When a call fails the question is whether you can resend it, not what the code is called. The last two columns are the answer: the retry policy and whether resending is idempotent.

StatuserrorWhen it happensRetryResend idempotency
400invalid_requestGeneric invalid request; also covers a cancel that supplies neither orderId nor clientOrderIdFix, then resendA read — resending has no side effect
400malformed_order_bytesA place-order carrying an on-chain signature (auth): orderBytes will not decode, or the signature is invalidFix, then resendA read — resending has no side effect
400expiration_required / expiration_mismatch / expired_envelope / envelope_exceededA signed order's expiration is missing, disagrees with the bytes, has passed, or exceeds the matching cutoffFix, then resendA read — resending has no side effect
400signature_requiredA market in on-chain mode rejects unsigned orders (migration switch, off by default)Fix, then resendA read — resending has no side effect
400comment_rejectedThe comment hit a blocked termFix, then resendA read — resending has no side effect
400invalid_address / invalid_emailMalformed address or emailFix, then resendA read — resending has no side effect
401auth_required / auth_failedNo session, or signature verification failed — always merged so the two cannot be told apart (anti-enumeration). Sessions are gated twice: 24h idle and a 7d absolute capFix, then resendA read — resending has no side effect
403login_method_disabledThat login method is not enabled (google and email are off by default)Do not retryA read — resending has no side effect
409display_name_takenDisplay names are globally unique and this one is takenFix, then resendA read — resending has no side effect
409chain_binding_not_activeThe on-chain binding exists but is unusable (status carries the raw state; FAILED and PENDING call for different handling)Retry with backoffA read — resending has no side effect
423user_blockedThe account is hard-stopped by a manual action or a jurisdiction policy (a freeze-class admission block)Do not retryA read — resending has no side effect
429code_cooldown / email_rate_limitedEmail verification code cooldown or send rate limit; message carries the retry-after secondsRetry with backoffA read — resending has no side effect
501heartbeat_disabledHeartbeats are not enabled on this deployment — the request is fine, the capability is offDo not retryA read — resending has no side effect
503command_log_unavailable / seq_unavailable / duplicate_in_flightRecoverable write-path failures: the command log is unwritable, sequence issuance is down, or the same clientOrderId is in flight. All are safe to retry with backoffRetry with backoffOnly with clientOrderId — without it a resend may become two orders
503chain_binding_source_unavailableClearing is unreachable — this does not mean “this market rejects orders”Retry with backoffA read — resending has no side effect

What is deliberately absent (so you stop looking)

  • There is no customer-facing REST deposit or withdrawal — money moves on-chain and through the indexer
  • internal, admin and X-Service-Key routes are not part of the public surface; the gateway blocks them outright