Skip to content

Rate Limits

API requests are rate limited to ensure fair usage and platform stability.

Limits by Plan

PlanRequests/minuteRequests/day
Sandbox10010,000
Starter50050,000
Growth2,000200,000
EnterpriseCustomCustom

Rate Limit Headers

Every response includes rate limit information:

X-RateLimit-Limit: 500
X-RateLimit-Remaining: 498
X-RateLimit-Reset: 1705312800
HeaderDescription
X-RateLimit-LimitMaximum requests per window
X-RateLimit-RemainingRemaining requests
X-RateLimit-ResetUnix timestamp when limit resets

Rate Limit Response

When exceeded, you'll receive:

http
HTTP/1.1 429 Too Many Requests
Retry-After: 30
json
{
  "error": {
    "code": "RATE_LIMITED",
    "message": "Rate limit exceeded. Retry after 30 seconds."
  }
}

Best Practices

1. Monitor Headers

typescript
const response = await iof.contracts.list();

const remaining = response.headers["x-ratelimit-remaining"];
if (remaining < 10) {
  console.warn("Approaching rate limit");
}

2. Implement Backoff

typescript
async function withRetry(fn, maxRetries = 3) {
  for (let i = 0; i < maxRetries; i++) {
    try {
      return await fn();
    } catch (error) {
      if (error.code === "RATE_LIMITED") {
        const delay = Math.pow(2, i) * 1000;
        await sleep(delay);
        continue;
      }
      throw error;
    }
  }
}

3. Use Batch Operations

Instead of individual requests:

typescript
// Inefficient
for (const id of contractIds) {
  await iof.contracts.retrieve(id);
}

// Efficient
const contracts = await iof.contracts.list({
  ids: contractIds,
});

4. Cache Responses

typescript
const cache = new Map();

async function getContract(id) {
  if (cache.has(id)) {
    return cache.get(id);
  }

  const contract = await iof.contracts.retrieve(id);
  cache.set(id, contract);
  return contract;
}

Endpoint-Specific Limits

Some endpoints have specific limits:

EndpointLimit
/v1/kyc/verify10/minute
/v1/aml/screen50/minute
/v1/reports/generate5/minute

Increasing Limits

Contact sales for:

  • Higher rate limits
  • Dedicated infrastructure
  • Custom SLA

Next Steps

Licensed under the Apache License 2.0