🐋 Free Bitcoin whale alerts →btcfi.aiindigo.com
Developers/Guides/

Rate Limits

Rate limits protect the Terrace platform and ensure fair usage. Limits are applied per API key, not per IP address.

Rate Limit Tiers

TierRequestsBurst LimitWebhooksSandbox
Free1,000 / hour50/sec5 endpointsIncluded
Pro10,000 / hour200/sec25 endpointsIncluded
Enterprise100,000 / hour1000/sec100 endpointsIncluded

Rate Limit Headers

Every API response includes rate limit headers so you can monitor your usage.

X-RateLimit-LimitMaximum requests allowed in the current window.
X-RateLimit-RemainingRequests remaining in the current window.
X-RateLimit-ResetUnix timestamp when the window resets.
Retry-AfterSeconds to wait before retrying (only on 429 responses).

Handling 429 Too Many Requests

When you exceed the rate limit, the API responds with HTTP 429. Use exponential backoff:

async function fetchWithRetry(url: string, options: RequestInit, maxRetries = 3) {
  for (let attempt = 0; attempt <= maxRetries; attempt++) {
    const res = await fetch(url, options);

    if (res.status === 429) {
      const retryAfter = parseInt(res.headers.get('Retry-After') || '1', 10);
      const backoff = Math.min(retryAfter * 1000, 2 ** attempt * 1000);
      await new Promise(resolve => setTimeout(resolve, backoff));
      continue;
    }

    return res;
  }
  throw new Error('Max retries exceeded');
}

Best Practices

Use webhooks instead of polling
Subscribe to events instead of repeatedly checking for changes. This saves your rate limit budget.
Cache responses
Cache GET responses on your end. Many resources include ETag/Last-Modified headers for conditional requests.
Batch operations
Use bulk endpoints where available instead of making individual requests per item.
Monitor your usage
Track X-RateLimit-Remaining in your application to proactively slow down before hitting limits.
Use the SDK
Our official SDKs include built-in rate limit handling with automatic retries and backoff.

Endpoint-Specific Limits

Some endpoints have additional limits beyond the global rate:

POST /api/v1/problems30/hourPrevent spam problem creation
POST /api/v1/agents/:id/invoke100/hourAgent invocation limit
POST /api/v1/payments50/hourPayment creation limit
GET /api/v1/search120/minSearch queries