Understanding Rate Limits
Olympus APIs use a token bucket algorithm for rate limiting. Each tier has different limits, and understanding these helps you build reliable integrations.
Olympus APIs use a token bucket algorithm for rate limiting. Each tier has different limits, and understanding these helps you build reliable integrations.
When you receive a 429 Too Many Requests response, implement exponential backoff to retry requests gracefully without overwhelming the API.
class="text-pink-400">async class="text-pink-400">function fetchWithBackoff(url: string, maxRetries = class="text-amber-400">5) {
class="text-pink-400">for (class="text-pink-400">let i = class="text-amber-400">0; i < maxRetries; i++) {
class="text-pink-400">const response = class="text-pink-400">await fetch(url);
class="text-pink-400">if (response.status !== class="text-amber-400">429) class="text-pink-400">return response;
class="text-pink-400">const delay = Math.pow(class="text-amber-400">2, i) * class="text-amber-400">1000;
class="text-pink-400">await class="text-pink-400">new Promise(r => setTimeout(r, delay));
}
class="text-pink-400">throw class="text-pink-400">new Error(class="text-emerald-class="text-amber-400">400">'Max retries exceeded');
}For high-volume applications, implement a request queue that respects rate limits while maximizing throughput.
Olympus APIs return rate limit headers with every response. Monitor X-RateLimit-Remaining and X-RateLimit-Reset to proactively manage your usage.
Explore our API documentation to start building with Olympus.