Developers
Rate limits, best practices, and error handling
Stay within 300 req/min on quotes, handle errors gracefully, and cache token metadata.
All posts
5 min read
Rate limits
- Quote / build / cross-chain / submit-solana: 300 requests per minute per IP
- Chains, tokens, settings, record: 120 requests per minute per IP
- Responses include RateLimit-Remaining header
Common error codes
- RATE_LIMITED (429) — exponential backoff starting at 2s
- NO_LIVE_QUOTES (503) — pair may be illiquid; try smaller size or different tokens
- SAME_TOKEN (400) — tokenIn and tokenOut must differ
- VALIDATION_ERROR (400) — check Zod shapes in OpenAPI spec
Best practices
Cache GET /swap/tokens results for at least 60 seconds. Re-quote only when amount or slippage changes — do not quote on every block. Always pass taker at quote time on EVM meta routes for accurate gas estimates. Use X-Client-Id consistently so admin can attribute traffic.
Ready to integrate?
Follow the quickstart or explore the OpenAPI reference.