Skip to main content

Documentation Index

Fetch the complete documentation index at: https://nexus.gerowallet.io/docs/llms.txt

Use this file to discover all available pages before exploring further.

Gero Nexus implements rate limiting to ensure fair usage and maintain service quality for all users.

Rate Limit Tiers

Rate limits vary based on your subscription plan:
PlanDaily LimitPer-Second LimitBurst Limit
Free10,000510
Starter100,0002050
Pro1,000,000100200
EnterpriseCustomCustomCustom
Burst Limit: Maximum requests allowed in a 1-second window during traffic spikes.

Rate Limit Headers

Every API response includes rate limit information in the headers:
X-RateLimit-Limit: 10000
X-RateLimit-Remaining: 9847
X-RateLimit-Reset: 1738713600
X-RateLimit-Per-Second: 5
HeaderDescription
X-RateLimit-LimitTotal daily requests allowed
X-RateLimit-RemainingRequests remaining in current period
X-RateLimit-ResetUnix timestamp when the limit resets
X-RateLimit-Per-SecondMaximum requests per second

Handling Rate Limits

Check Before Calling

Always check the rate limit headers before making additional requests:
const response = await fetch('https://nexus-dev.gerowallet.io/api/blocks/latest', {
  headers: { 'Authorization': `Bearer ${accessToken}` }
});

const remaining = response.headers.get('X-RateLimit-Remaining');
const resetTime = response.headers.get('X-RateLimit-Reset');

if (remaining < 100) {
  console.warn(`Only ${remaining} requests remaining`);
  console.warn(`Resets at ${new Date(resetTime * 1000)}`);
}

Implement Exponential Backoff

When you receive a 429 Too Many Requests error, implement exponential backoff:
async function fetchWithRetry(url, options, maxRetries = 3) {
  for (let attempt = 0; attempt <= maxRetries; attempt++) {
    try {
      const response = await fetch(url, options);

      if (response.status === 429) {
        const retryAfter = response.headers.get('Retry-After') || Math.pow(2, attempt);
        console.log(`Rate limited. Retrying after ${retryAfter}s...`);
        await new Promise(resolve => setTimeout(resolve, retryAfter * 1000));
        continue;
      }

      return response;
    } catch (error) {
      if (attempt === maxRetries) throw error;
    }
  }
}

Best Practices

Cache frequently accessed data to reduce API calls:
const cache = new Map();
const CACHE_TTL = 60000; // 1 minute

async function getCachedBlock(blockHash) {
  const cached = cache.get(blockHash);
  if (cached && Date.now() - cached.timestamp < CACHE_TTL) {
    return cached.data;
  }

  const data = await fetchBlock(blockHash);
  cache.set(blockHash, { data, timestamp: Date.now() });
  return data;
}
Where possible, use batch endpoints to reduce API calls:
// Instead of multiple single requests
const blocks = await Promise.all([
  fetchBlock(hash1),
  fetchBlock(hash2),
  fetchBlock(hash3)
]);

// Use batch endpoint (if available)
const blocks = await fetchBlocks([hash1, hash2, hash3]);
Track your API usage in the dashboard to avoid hitting limits:
  • View real-time usage graphs
  • Set up alerts at 80% and 90% thresholds
  • Monitor per-key usage for distributed apps
Use field selectors to reduce response size and processing time:
// Request only specific fields
const response = await fetch(
  'https://nexus-dev.gerowallet.io/api/blocks/latest?fields=hash,height,time',
  { headers: { 'Authorization': `Bearer ${accessToken}` } }
);

Upgrading Your Plan

Need higher limits? Upgrade your plan or contact us for Enterprise custom limits.

Next Steps

Error Handling

Learn how to handle API errors

Pagination

Working with paginated responses