ZetariumZetariumDex

Errors

Response envelope, HTTP status codes and domain-specific error codes.

Response envelope

Successful responses:

{ "ok": true, "...": "...payload" }

Error responses:

{ "ok": false, "error": "human readable message", "errorId": "abc123def456..." }

errorId is auto-generated for every error response (4xx and 5xx) and lets the support team locate the matching log entry. Quote it in any bug report.

HTTP status codes

StatusMeaningAction
200Success
400Validation / business-rule errorShow error, do not retry.
401Auth failure (key, signature, timestamp, replay)Sync clock, verify key.
403Forbidden (IP whitelist, permission, JWT-only endpoint)Check permission set.
404Resource not found (order id, transfer id, …)Verify the id.
409Conflict (idempotent retry, race, guard)Inspect code — see below.
429Rate limit exceededWait for Retry-After, exponential back-off.
500Internal errorOpen a support ticket with errorId.
503Transient failure (RPC down, etc.)Retry with short exponential back-off.

Domain-specific error codes

Some 4xx responses carry a code field alongside error — branch on it programmatically:

codeEndpointMeaningClient action
OPEN_POSITION_LEVERAGE_GUARDPOST /v2/futures/leverageOpen position present; leverage change would shift liquidation price.Resend with forceWithOpenPosition: true (only with explicit user intent).
OPEN_POSITION_MARGIN_GUARDPOST /v2/futures/margin-typeSame guard, for margin-type changes.Resend with forceWithOpenPosition: true.
OPEN_POSITION_MARGIN_REJECTPOST /v2/futures/margin-typeVenue refused the margin-type switch even with forceWithOpenPosition: true (typically because the resulting margin would breach maintenance).Close or reduce the position, then retry — or use POST /v2/futures/close-and-switch-margin to do both atomically.

New codes will be added here as they ship. For unknown codes, fall back to displaying error.

On this page