Skip to content

What are the limits?

The Lottery Results REST API employs rate limits to ensure a uniform experience for all users.

Warning

Limits may change during the alpha phase.

Note

Feature under improvement. Adding new mechanism to help better manage limits applied for clients.

Rate Limits

The constraints detailed in this section apply to every request made to the REST API.

Global Applications

To prevent service overload, global rate limit per public IP source is enforced for any API route. Calculated over all API routes. Limits are cumulated.

  • 10 requests per seconds
  • 30 requests per minutes
  • 1000 requests per hours

These limits may change in the future.

Operation specific limits

In a few exceptional circumstances, individual REST API operations may apply additional limits. If an endpoint applies additional limits; it will be noted in the REST API documentation for that endpoint.

Working with limits

How can your application gracefully interact with these limits? This section describes how our API informs client applications about limiting and covers some best practices.

Reaching the limit

In the event that your application reaches a limit: the HTTP response code will be 429, the response body will indicate that limiting has occurred:

HTTP/1.1 429 Too Many Requests
{ ... }

In addition, the header x-ratelimit-reset is positioned to indicate the timestamp from which you can retry.

HTTP/1.1 429 Too Many Requests
...
x-ratelimit-reset: 1577844061
...

Best practices

Ensure your application is ready to handle being rate limited. Update your application to not retry before the x-ratelimit-reset timestamp.