Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Errors and response states

Generic errors

Non-quote application errors use:

{
  "error": "message"
}

Quote errors

Quote failures use a structured body. detail may be null.

{
  "code": "NO_ROUTE",
  "message": "no route",
  "detail": "NO_QUALIFIED_ROUTE_WITHIN_HOP_LIMIT"
}

The following code strings map to HTTP status codes:

CodeHTTP status
INVALID_PARAMS400
INVALID_ADDRESS400
UNSUPPORTED_CHAIN404
NOT_A_POOL404
TOKEN_UNKNOWN404
NO_ROUTE422
NOT_SUPPORTED422
RPC_UNAVAILABLE503
BUDGET_EXCEEDED503
DEADLINE_EXCEEDED504

Authentication and authorization

  • 401 Unauthorized: the credential is missing, invalid, expired, or revoked. The response body is empty and includes WWW-Authenticate: Bearer.
  • 403 Forbidden: the credential is valid but the consumer is not allowed to use the requested endpoint. The response body is empty.

Rate limiting

429 Too Many Requests has an empty body. The numeric Retry-After header gives the number of seconds to wait before retrying. Rate limiting is isolated per consumer; requests made with a session cookie use the same bucket as the bearer credential that created it.

Token-quote response states

GET /v1/quote/token/{chain_id}/{token_address} may return a non-error response without a price:

HTTP statusStateCaller action
202 AcceptedEnrollment was accepted, but discovery or initial evaluation is still pending.Do not treat the token as priced. Retry later and observe normal rate-limit guidance.
200 OKUNPRICED: the token is known and the request completed, but no publishable USD price is currently available.Treat the price as unavailable, not zero. Keep the response metadata and retry when newer evidence may exist.

A 202 response means work is pending. A 200 UNPRICED response is a completed evaluation with no usable price at that time.