Rate Limiting
Our API implements rate limiting to ensure fair usage and protect service stability. Understanding these limits helps you build reliable applications.
Rate limits
Transaction limits vary by plan:
| Plan | Included Transactions | Additional |
|---|---|---|
| Starter | 1,000 | Up to 5,000 |
| Compliance | 1,000 | Up to 5,000 |
| Starter Plus | 1,000 | Up to 5,000 |
| Compliance Plus | 1,000 | Up to 5,000 |
| Enterprise | Custom | Unlimited |
Rate limits apply per API key. Using multiple keys does not bypass account-level limits.
Rate Limit Headers
Every response includes headers to help you track your usage:
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum requests allowed per window |
X-RateLimit-Remaining | Requests remaining in current window |
X-RateLimit-Reset | Unix timestamp when the window resets |
HTTP/1.1 200 OKX-RateLimit-Limit: 600X-RateLimit-Remaining: 595X-RateLimit-Reset: 1706198400
Handling Rate Limits
When you exceed the rate limit, you'll receive a 429 Too Many Requests response. Implement retry logic with exponential backoff:
retry-logic.ts
1async function fetchWithRetry(url: string, options: RequestInit, maxRetries = 3) {2 for (let attempt = 0; attempt < maxRetries; attempt++) {3 const response = await fetch(url, options);45 if (response.status === 429) {6 // Get retry delay from header or use exponential backoff7 const retryAfter = response.headers.get('Retry-After');8 const delay = retryAfter9 ? parseInt(retryAfter) * 100010 : Math.pow(2, attempt) * 1000;1112 console.log(`Rate limited. Retrying in ${delay}ms...`);13 await new Promise(resolve => setTimeout(resolve, delay));14 continue;15 }1617 return response;18 }1920 throw new Error('Max retries exceeded');21}
Pro tip
Monitor the
X-RateLimit-Remaining header and slow down requests before hitting the limit. This provides a better user experience than waiting for errors.