Skip to main content
The HopX API implements rate limiting to ensure fair usage and system stability. Rate limits vary by endpoint and account plan.

Rate Limit Tiers

Default Limits

Plan-Based Limits

Rate limits may vary based on your account plan:
  • Free Tier - Default limits
  • Pro Tier - 2x default limits
  • Enterprise - Custom limits

Rate Limit Headers

Every API response includes rate limit headers:

Rate Limit Exceeded

When you exceed the rate limit, you’ll receive a 429 Too Many Requests response:
The retry_after field indicates how many seconds to wait before retrying.

Best Practices

1. Monitor Rate Limit Headers

2. Implement Exponential Backoff

3. Batch Operations

Instead of making many individual requests, batch operations when possible:

4. Cache Responses

Cache responses that don’t change frequently:

5. Distribute Requests Over Time

Rate Limit Strategies

Sliding Window

Rate limits use a sliding window algorithm, not a fixed window. This means:
  • Limits are enforced per 60-second rolling window
  • Request counts decay as time passes
  • Burst traffic is allowed up to the limit

Per-Endpoint Limits

Some endpoints have separate rate limits:

Handling Rate Limits in Production

Production-Ready Handler

Increasing Rate Limits

If you need higher rate limits:
  1. Upgrade Your Plan - Higher tiers include increased limits
  2. Contact Support - Request custom limits for your use case
  3. Optimize Your Code - Reduce unnecessary API calls

Monitoring Usage

Check your current usage via the API:
Response:

Next Steps