NEXO
Launch App
Back to Docs
Advanced4 min read

Rate Limits

Understanding and working with API rate limits

Rate Limit Tiers

TierRequests/minRequests/day
Free10010,000
Pro1,000100,000
EnterpriseCustomCustom

Rate Limit Headers

http
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1699999999

Handling Rate Limits

typescript
try {
  const result = await client.execute(tx);
} catch (error) {
  if (error.code === 'RATE_LIMITED') {
    const retryAfter = error.retryAfter; // seconds
    await sleep(retryAfter * 1000);
    // Retry request
  }
}

Best Practices

  • Implement exponential backoff for retries
  • Cache responses when possible
  • Use WebSocket for real-time data instead of polling
  • Batch requests where supported