QRDXDocs

Errors

JSON-RPC error codes, REST errors, wallet provider errors, and why exchange transactions fail.

JSON-RPC

Errors follow JSON-RPC 2.0: {"jsonrpc": "2.0", "id": 1, "error": {"code": -32602, "message": "…"}}.

CodeNameMeaning
-32700Parse errorThe body is not valid JSON.
-32600Invalid requestNot a JSON-RPC 2.0 request object.
-32601Method not foundNo such method, or its namespace is not enabled on this node.
-32602Invalid paramsWrong number or type of parameters.
-32603Internal errorThe node failed while answering.
-32000Server errorA generic server-side failure.
-32001Resource not founde.g. an unknown perps market or pool.
-32002Resource unavailableThe data is not available yet (still syncing, index catching up).
-32003Transaction rejectedSubmission refused before execution; the message gives the reason.
-32004Method not supportedKnown, but not supported in this configuration.
-32005Limit exceededA rate or size limit.
-32015Execution errorAn EVM call reverted (eth_call, eth_estimateGas).
-32099Action not allowedThe node refuses the action.

The node's JSON-RPC endpoint does not accept batched requests: send one request per call.

REST

Every endpoint answers {"ok": true, "result": …} or {"ok": false, "error": "…"}. HTTP status codes follow the error: 400 for bad parameters, 404 for unknown objects, 429 when you are rate-limited.

Submitting exchange transactions

A submission is either refused at admission (nothing happens, the nonce is not used) or executed in a block (the nonce is used and gas is paid, even if the operation fails).

Refused at admission (-32003)Why
invalid signatureThe signature does not verify over the signing bytes with public_key, or the key does not derive to sender.
nonce too low: …, or outside the nonce windowUse exchange_getNonce. Operations the node has queued but no block has included still hold their nonces.
under-pricedgas_price is below the minimum exchange_gasPrice returns.
unaffordable gasThe sender needs QRDX for gas_limit × gas_price, reserved while it runs.

Executed but failed operations come back in the receipt as "success": false with an error, for example a swap whose output is below min_amount_out, an order the account cannot afford, a margin check, a frozen account, or a paused token. Nothing but the fee changes.

Wallet provider (EIP-1193)

CodeMeaning
4001The user rejected the request or closed the approval.
4100Not authorized: the site is not connected, or that account is not shared with it.
4200Method not supported (eth_sign is disabled on purpose).
4900The wallet is unavailable: reload the page, or open the wallet on the phone.
4902Unknown chain id.
-32602Invalid parameters.

On this page