Handling Throttling

To protect the resources of Snap XMP Online we have implemented throttling. This means that some of your API calls may return a status code of 429 – Too many requests.

You should ensure that you don’t attempt to make more than one call per second or more than ten calls per minute. One way to achieve this is to perform a “sleep” in between calls.

We reserve the right to change the throttling limits at any time.

Current throttling metrics are returned in the following response headers:

Response headerDescription
X-RateLimit-Limit-Per-Secthe current limit per second
X-RateLimit-Remaining-Per-Sechow many requests are remaining in this second period. This can be negative.
X-RateLimit-Reset-Per-Secthe UNIX time of when the next request is allowed
X-RateLimit-Limit-Per-Minthe current limit per minute
X-RateLimit-Remaining-Per-Minhow many requests are remaining in this minute period. This can be negative.
X-RateLimit-Reset-Per-Minthe UNIX time of when the next request is allowed

Ideally, when a 429 status code is received your code should automatically change its “sleep” behaviour based on these metrics. Alternatively, you may decide to wait say 15 seconds between calls which should satisfy all future per second and per minute requirements.

Contents