422
with {"error": "<reason>"}, and nothing reaches the engine.INSUFFICIENT_CASH: in the order's code (with ?wait), in a refused event
on the WebSocket, as a cancel's or a quote request's status, or as the
error of a withdrawal's 422.| Reason | What to do |
signature: …, signature does not recover, bad signature hex | The signature is malformed, has a high s, or is not over these exact terms and this domain. |
signed by a key not registered for the maker, or expired | Sign with the account's own key, or register this key with setSigningKey and wait a few seconds for its block to be read. |
signed by another key: only the account's own may | A withdrawal request must be signed by the account itself. |
the order outlives its signing key: … | Shorten expiresAt, or extend the key. |
| Reason | What to do |
nonce must be in [1, 2^62) | See Nonces. |
nonce names shard N; this engine is shard 0 | Bits 54–61 of the nonce must be zero. |
nonce below the maker's on-chain floor, nonce below the account's on-chain floor | You raised your floor with cancelUpTo; use a nonce above it. |
| Reason | What to do |
bad order terms | side is not 0 or 1, or size is 0. |
specifier names no listable contract | The specifier does not decode to a listed strike, European style and multiplier 100. |
no such instrument | Well-formed, but not listed. Check GET /v1/instruments. |
price is off the ladder | See the tick ladder. |
order outlives its contract | expiresAt is after the contract's expiry. |
order already expired | expiresAt is in the past. |
fee cap below the instrument's fees | Raise maxFeePerMille so that ten times it is at least both of the instrument's rates. |
maxFeePerMille is a uint8 counting tens of basis points: at most 255 | |
size exceeds the engine's maximum order | At most 230 contracts. |
N orders of M lots in all may make M fills at once …; this account's class allows B … | The order, or the batch's orders summed, is larger than the account's whole fill burst: 100 contracts for an ordinary account on the testnet. Split it over time. See Account classes. |
N orders and M cancels cost C of the signed rate at once; this account's class allows B … | The batch costs more than the class's whole signed burst. Send it in smaller batches. |
wait: milliseconds | ?wait is not a whole number of milliseconds. |
bad json: … | The body did not decode, or a number was sent as a string. |
| Reason | What to do |
no engine account for the maker: deposit first, unknown account | Your first deposit opens your account. |
account inactive | The account is deactivated or frozen. |
| Reason | What to do |
a batch holds 1..256 members | |
member N: an order or a cancel | Each item holds exactly one of order and cancel. |
member N: a batch is one maker's | Every item in a batch must have the same maker. |
member N: <reason> | Member N (from 0) failed with <reason>; nothing in the batch was sent. |
| Reason | What to do |
side must be 0 (buy), 1 (sell) or 2 (none) | |
size must be in [1, 2^30] |
| Reason | Status | What to do |
an address, address, challenge and signature, signature: 65 bytes of hex | 422 | A field is missing or malformed. |
session: the challenge is not one this exchange issued, or has expired | 401 | Ask for a new challenge: each lasts 5 minutes. |
session: the signature is not the address's, nor a key it registered | 401 | Sign the message exactly as returned, with personal_sign. |
a session for this address is required … | 401 | Send Authorization: Bearer <token>. |
the session is another address's | 403 | |
nonce: an integer, underlyingKey and specifier: integers, before: …, state: resting … | 422 | A path or query parameter is malformed. |
| Reason | What to do |
bad request | The body did not decode, or amount is not above 0. |
INSUFFICIENT_CASH and the other engine codes | The engine refused the debit. |
| Code | Meaning |
INSUFFICIENT_CASH | Free cash does not cover what the order adds to the account's requirement (see Security), or a withdrawal exceeds free cash. |
INVALID_PRICE | The price is off the ladder. |
PRICE_ABOVE_MAX_PAYOFF | Above 1000000 − K for a call or K for a put. |
INVALID_QUANTITY | The quantity is out of range. |
INSTRUMENT_NOT_ACTIVE | The contract is halted or settling. Cancels are still accepted. |
BOOK_NOT_LIVE | The contract's book is no longer open: it is settling or settled. |
ORDER_EXPIRED | The order's expiry had passed by the time the engine applied it. |
OPEN_ORDER_LIMIT | The account already has its class's cap of resting orders, and this order could rest. Cancel some, or send one with a zero lifetime. See Account classes. |
BOOK_LIMIT | The order would open a book (an underlying at one expiry) past the account's class's cap. |
NONCE_USED | This nonce has already been used by this account, for an order, a cancel, a quote request or a withdrawal. With ?wait, order says where the order that used it stands. |
NONCE_BELOW_WINDOW | The nonce is more than 4096 below the highest this account has used. Keep nonces increasing. |
NONCE_OUT_OF_SPACE | The nonce is zero or outside the account range. |
NONCE_BELOW_FLOOR | Below the floor set on chain with cancelUpTo. |
ORDER_NONCE_NOT_FOUND | A cancel named an order that is not resting: it filled, expired, was cancelled, or never rested. |
ORDER_OUTLIVES_KEY | The order would rest past its signing key's expiry. |
SIGNING_KEY_INVALID | The signing key is not registered for the account, or has lapsed. |
ACCOUNT_NOT_ACTIVE | The account is deactivated or frozen. |
UNDERLYING_KEY_MISMATCH | The underlyingKey does not name the contract's underlying. |
ORDER_POOL_FULL, POSITION_POOL_FULL, POSITION_LINE_POOL_FULL | The engine is at capacity. Try again later. |