Skip to content

Errors

v1 is closed to new integrations

Do not build on v1. The current API is v2 RFQ. v1 stays served for integrations already running on it, takes no new features, and gets no new endpoints.

Every error has the same shape:

json
{
  "error": {
    "code": "invalid_request",
    "message": "sellAmount: Expected a value greater than 0",
    "request_id": "req_…",
    "details": { "issues": [  ] }
  }
}

code is stable and machine-readable. Branch on it, not on message. request_id is also returned as the X-Request-Id header; quote it when you report a problem. details is present for validation errors and lists the offending fields.

Codes

HTTPcodeMeaningWhat to do
400invalid_requestBad or missing parameter, or a chain your key can't useFix the request; check details
401unauthorizedMissing, malformed, revoked, or unknown keyCheck the Authorization header
403forbiddenKey lacks the scope for this endpointRequest a key with the right scope
404not_foundNo such swap / webhook / routeCheck the id
409conflictIdempotency-Key reused on a different request, or swap already submitted with another txUse a fresh key / don't resubmit
429rate_limitedOver your rate limitBack off; see Retry-After
502upstream_errorA chain RPC or the subgraph was unreachableRetry with backoff
500internalSomething broke on our sideRetry; if it persists, send us the request_id

Handling tips

  • Treat 429 and 502 as transient. Retry with exponential backoff and jitter.
  • Treat 400, 403, 404, 409 as your bug. Don't blind-retry, fix the request.
  • A 200 with "fillable": false on POST /v1/swaps is not an error. It means no liquidity right now.