Skip to main content
DerivaDEX errors can appear in three places: the HTTP response to a private request, a failed WebSocket subscribe or unsubscribe message, or a rejection in the realtime account feeds.

Where errors appear

Use this table to identify the source of the error before looking up the code itself.

HTTP error codes

These are the public error_reason values returned by the private request endpoint, along with the right response for each one. For signed POST /v2/request calls, “the same request” means the same signed JSON body. A retry may use fresh encryption, but it must not change clientTimestampMs, recvWindowMs, nonce, business fields, delegated-session proof, or signature. A request has unknown completion when the client gets no HTTP response or cannot finish reading the response body: retry the exact signed body while its replay window remains valid, or check committed identifiers such as requestIndex or order hash.

Error response format

Every HTTP error response uses the same three fields. Ordinary replay and request-shape errors serialize safety_failure as null:

Safety-failure codes

These safety_failure values appear only alongside 422 SafetyFailure, except for MarketPriceNotAvailable, which currently maps to 503 ServiceUnavailable.

Trader and strategy state

These codes mean the request referred to a trader or strategy state the operator could not use.

Order details and market rules

These codes mean the request itself broke a market rule before the order could move forward.

Margin, collateral, and withdrawal checks

These codes mean the request itself was well-formed, but the trader’s account did not meet a balance or solvency rule.

Mark-price availability

This code means the operator did not have the required mark price yet. It does not mean the request itself was malformed.

Rejections in realtime feeds

Rejections in realtime feeds do not use the HTTP error_reason fields. They appear inside the feed payload itself.
Last modified on June 22, 2026