Rate Limits
To ensure high availability and consistent performance for all BudSense partners, we enforce rate limits on our API. These limits help prevent accidental service degradation and ensure that every integration runs smoothly.
Thresholds
Section titled “Thresholds”The BudSense Partner API uses a “token bucket” algorithm.
- 20 requests per second
- Burst up to 10 requests
Understanding the Wait Time
Section titled “Understanding the Wait Time”Because the bucket refills at a rate of 20 tokens per second, the recovery time is as follows:
- To regain 1 request: Wait 50ms.
- To regain a full burst (10 requests): Wait 500ms.
Scopes of Rate Limits
Section titled “Scopes of Rate Limits”Rate limiting is applied at the Partner ID level. This is a global limit that encompasses all calls made by a partner across companies.
Handling Throttling
Section titled “Handling Throttling”If your application exceeds the allowed threshold, the API will return an HTTP 429 Too Many Requests status code.
Because the BudSense Partner API does not currently return remaining quota headers, your application should be prepared to handle 429 errors gracefully using an exponential-backoff strategy.
Recommended Guidance on Backoff
Section titled “Recommended Guidance on Backoff”Implement a backoff algorithm where the wait time increases exponentially with each consecutive failure (e.g., 100ms, 200ms, 400ms).
Increasing your rate limit
Section titled “Increasing your rate limit”If you need to increase your rate limit, please contact us