Rate limiting

To ensure stability and fair usage, the API enforces rate limits on the number of requests that can be made within a specific time period. This mechanism helps protect the system from excessive traffic and ensures reliable performance for all users.

Current Rate Limit

  • Limit: 10 requests per second.
  • Scope: Rate limits are applied per API key.

Note:

The rate limit is temporary and may change based on usage patterns and system requirements. Check this page regularly for updates.


How Rate Limiting Works

If a client exceeds the rate limit:

  • The server will respond with a 429 Too Many Requests status code.
  • Further requests will be denied until the rate limit resets.

Example Response (Rate Limit Exceeded)

HTTP/1.1 429 Too Many Requests
Content-Type: application/json

{
    "error": "Rate limit exceeded. Please wait and retry after the specified time."
}

Identifying Rate Limits

The API includes rate limit information in the response headers of each request.

Response Headers

HeaderDescription
RateLimit-LimitThe maximum number of requests allowed per minute.
RateLimit-RemainingThe number of requests remaining in the current window.
RateLimit-ResetThe time (in seconds) until the rate limit resets.

Example Headers

RateLimit-Limit: 10
RateLimit-Remaining: 6
RateLimit-Reset: 30

Best Practices for Clients

  1. Monitor Rate Limit Headers:

    Use the RateLimit-Remaining and RateLimit-Reset headers to track your usage and avoid exceeding the limit.

  2. Implement Retry Logic:

    If you receive a 429 Too Many Requests response, implement a delay before retrying based on the RateLimit-Reset value.

Example (Exponential Backoff in JavaScript)

async function makeRequest() {
  try {
    const response = await axios.get('<https://api.example.com/resource>');
    console.log(response.data);
   } catch (error) {
    if (error.response && error.response.status === 429) {
      const resetTime = error.response.headers['Ratelimit-Reset'];
      console.warn(`Rate limit exceeded. Retrying after ${resetTime} seconds.`);
      setTimeout(makeRequest, resetTime * 1000);
    } else {
      console.error(error);
    }
  }
}

makeRequest();
  1. Optimize Requests:

    Batch or cache requests whenever possible to minimize the number of API calls.

  2. Contact Support for Higher Limits:

    If you anticipate higher usage, reach out to our Support Team to discuss rate limit adjustments.