The DEX Aggregator API enforces a per-key sliding-window rate limit. The default is 120 requests per minute per API key.Documentation Index
Fetch the complete documentation index at: https://docs.o1.exchange/llms.txt
Use this file to discover all available pages before exploring further.
How it works
Per-key
The window is keyed off the
x-api-key header, not your IP. Each key gets its own bucket.Sliding 60-second window
Hits are tracked with timestamps. The window is
now − 60s..now. There’s no hard reset on the minute boundary; the oldest hits drop off as time passes.What counts as a request
Every authenticated call counts:POST /quotePOST /submitPOST /execute
GET /health is public and free.
What you get on overflow
Recommended retry
Capacity planning
A few guidelines for sizing your usage:| Workload | Approximate rate | Headroom |
|---|---|---|
| Single-user swap UI with live quote polling (one user, 8s polling) | ~7 req/min | Plenty |
| 10 concurrent users polling | ~75 req/min | Comfortable |
| 50 concurrent users polling | ~375 req/min | Exceeds default — request a higher tier |
| Server-side bot quoting once per second per pair | 60 req/min × pairs | Scales linearly |
Per-pair caching tips
You can dramatically reduce request count on the client by:- Debouncing user input. Don’t quote on every keystroke; quote 300ms after the last input.
- Coalescing identical quotes. If two components need the same
(tokenIn, tokenOut, amountIn)quote, share one fetch. - Pausing polling when the tab is hidden. Use
document.visibilityState === "hidden"to skip ticks.
What does NOT scale your quota
- Adding more API keys for the same product. The o1 team can detect related keys and apply combined limits if abuse is suspected.
- Spreading requests across IPs while reusing one key. The limit is keyed on the key, not the IP.
