Skip to content

Error codes

HTTP status codes, exchange error strings, retry behavior, and the errors that are safe to retry automatically.

Updated Nov 4, 2026Builders2 min read
On this page

Errors are returned with a non-2xx HTTP status and a JSON body. The response field is human-readable; use the HTTP status and the error code for programmatic handling.

Response shape

code
{
  "status": "err",
  "response": "Insufficient margin to place order"
}

HTTP status

StatusMeaningRetry?
400Invalid request or validation errorNo
401Missing or invalid signatureNo
403Account not permittedNo
404Unknown route or assetNo
409Nonce conflict or duplicate orderSometimes
429Rate limit exceededYes, with backoff
500Internal errorYes, with backoff
503Temporary unavailabilityYes, with backoff

Exchange errors

ErrorCauseFix
Invalid signatureWrong domain, hash, or signerRe-sign with the correct chain ID
Nonce too lowReused nonceIncrement the nonce
Nonce too highClock skew > 10sSync the system clock
Insufficient marginNot enough collateralReduce size or add margin
Invalid priceTick size violationRound to the market tick
Invalid sizeLot size violationRound to the lot size
Reduce only order would increase positionWrong side or sizeCheck the position
Order not foundCanceled or filledRefresh open orders
Action already expiredexpiresAfter in the pastGenerate a new timestamp
Market haltedGovernance or deployer haltWait for the market to resume

Do not blind-retry writes

A timeout does not mean the action failed. Before retrying a signed action, query the order by cloid or oid. Retrying an order without a cloid can create a duplicate.

Retry policy

  • 429: read Retry-After, wait, then retry with jitter.
  • 500 / 503: retry up to 3 times with exponential backoff.
  • 409: resolve the nonce or duplicate state before retrying.
  • 400 / 401 / 403: fix the request; do not retry.

Idempotency

Use a unique cloid for every order. If the response is lost, orderStatus by cloid tells you whether the order exists. For cancels, a “not found” result is safe to treat as success.

Was this page helpful?