Skip to main content

Rate Limiting

The Krown Marketplace API implements fair-use rate limiting to ensure service availability for all users.
Good news! Our rate limits are generous and should accommodate most use cases without requiring authentication.

Current Limits

Endpoint TypeRequests per Minute
Default & Tokens endpoints750
Search & Collection endpoints500

Rate Limit Headers

Every API response includes rate limit information in the headers:
X-RateLimit-Limit: 750
X-RateLimit-Remaining: 749
X-RateLimit-Reset: 1640000000

Best Practices

If you receive a 429 Too Many Requests response, wait before retrying:
async function fetchWithRetry(url, maxRetries = 3) {
  for (let i = 0; i < maxRetries; i++) {
    const response = await fetch(url);

    if (response.status !== 429) {
      return response;
    }

    // Exponential backoff: 1s, 2s, 4s
    await new Promise(r => setTimeout(r, Math.pow(2, i) * 1000));
  }
}
Many endpoints include Cache-Control headers. Respect these to reduce unnecessary requests:
// Collections don't change frequently - cache for 5 minutes
const cachedCollections = localStorage.getItem('collections');
if (cachedCollections && isNotExpired(cachedCollections)) {
  return JSON.parse(cachedCollections);
}
Don’t fetch all pages at once. Load data as needed:
// Good: Load page by page
const page1 = await fetch('/api/collections?page=1&limit=50');

// Avoid: Fetching all pages simultaneously
// This will hit rate limits quickly
Instead of making multiple single-item requests, use list endpoints with filters:
// Good: Single request with filter
fetch('/api/tokens/collection/0x123?limit=100')

// Avoid: Multiple individual requests
// tokens.forEach(id => fetch(`/api/tokens/0x123/${id}`))

Error Response

When you exceed the rate limit, you’ll receive:
{
  "error": "Too Many Requests",
  "message": "Rate limit exceeded. Please try again later.",
  "retryAfter": 60
}
HTTP Status Code: 429 Too Many Requests

Need Higher Limits?

If you’re building something that requires higher rate limits, we’d love to hear about it!

Contact Us

Reach out to discuss your use case and we can work with you on a solution.