Rate Limiting

To ensure fair usage and maintain the stability and availability of our services, all API requests are subject to rate limiting. This mechanism prevents abuse and ensures that all users can access the service reliably.

Understanding Rate Limits

Rate limits define the maximum number of requests a user or application can make to our API within a specified time window. When you exceed these limits, your requests will be temporarily denied.

Key Concepts

Current Rate Limits

The following rate limits apply to all API consumers:

Note: These limits may be adjusted over time to optimize service performance. Always check the latest documentation for the most up-to-date information.

Handling Rate Limit Exceeded Errors

When you exceed the rate limits, the API will respond with an HTTP status code 429 Too Many Requests. The response headers will provide additional information about your current rate limit status:

Response Headers

Example of a 429 Response

If you make too many requests, you might receive a response like this:

HTTP/1.1 429 Too Many Requests
Content-Type: application/json
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1678886400

{
  "error": "You have exceeded your rate limit. Please try again later."
}

Best Practices for Rate Limiting

To avoid hitting rate limits and ensure smooth operation of your applications, consider the following strategies:

Example of Exponential Backoff Logic (Conceptual)

// Assume 'response' is the API response object
const remainingRequests = parseInt(response.headers['x-ratelimit-remaining']);
const resetTime = parseInt(response.headers['x-ratelimit-reset']);

if (remainingRequests === 0) {
    const currentTime = Math.floor(Date.now() / 1000);
    const delay = (resetTime - currentTime + 5) * 1000; // Add a buffer

    setTimeout(() => {
        // Retry the request
        makeApiRequest();
    }, delay);
} else {
    // Process the successful response
}

By adhering to these guidelines, you can ensure a stable and efficient integration with our API.