- Look up the exact message string for a given HTTP status
- Wire up retry logic for idempotency-aware POST endpoints
- See which endpoints carry extra
400cases beyond the common set - Plan ahead for the v3 status code changes
Response shape
Most v2 errors use a bare two-field envelope:error object carrying a machine-readable code and a details string:
v2 has a hybrid error shape. Most errors use the bare
{ status, message } form, while idempotency errors add the error.code nested object. Branch on response.status first, then check data.error?.code when you need to disambiguate idempotency cases. v3 normalises this so every error carries a stable code — see Notable v2 → v3 changes below.message is human-readable and is not guaranteed stable across releases — a copy edit can change it. For idempotency errors, switch on error.code. For everything else in v2, switch on HTTP status code.
Common errors (every endpoint)
These five status codes can fire on any v2 endpoint. The message strings below are the exact strings the OpenAPI spec documents.The 409/422 rows above only apply to endpoints that participate in idempotency. In v2 that includes both POST endpoints (where
Idempotency-Key is required) and GETs (where the header is honoured if you send it). All v2 endpoints can return the 409 or 422 idempotency conflict — the OpenAPI spec documents both responses on every operation.Idempotency errors
These codes come back inside the nestederror.code field. They are the only v2 errors with a stable machine-readable code today.
See Migration v1 → v2 — Step 5: Handle new error codes for a worked client-side handler that branches on these codes.
Endpoint-specific errors
Most endpoints emit only the common five. The list below covers the endpoints whose OpenAPI catalog adds messages beyond that set.POST /v2/brokerage//withdrawal (stablecoin)
Three additional 400 cases on top of the common set. All three are state- or input-driven and should be surfaced to the user rather than retried.
See Initiate stablecoin withdrawal.
POST /v2/brokerage//fiat_withdrawal
Three additional 400 cases — analogous to the stablecoin case but applied to bank accounts.
See Initiate fiat withdrawal.
POST /v2/brokerage//generate_quote
The 500 case carries a quote-specific message instead of the generic one.
See Generate quote.
POST /v2/brokerage//trade/reverse
Adds a 404 and a business-logic 409 on top of the common five.
See Reverse a trade.
POST /v2/brokerage//trade/reverse-quote
Adds a 404 and a quote-specific 500 on top of the common five.
See Generate a reverse quote.
POST /v2/brokerage//trade/settle
Adds a 404 and a business-logic 409 on top of the common five.
See Settle a trade.
v3 status code changes
v3 reshapes errors into a single uniform envelope with a stableerror.code on every response, and lines several status codes up with the bucket they semantically belong to. Highlights:
See Migration from v2 → HTTP status changes for the full delta and a worked migration plan.
What’s next
- Building retry logic? Read Migration v1 → v2 — Step 3: Handle retry logic.
- Want stable error codes today? v3’s error catalog ships a uniform
{ code, type, message, details }envelope on every response. - Hit an error not listed here? It’s almost certainly a transient
500 An internal error has occurred. Capture the response body and timestamp, then contact support.