Blog

Developer Guide

How API Rate Limits Affect Blockchain Applications in Production

Your blockchain app works perfectly in development. Then you launch, get 50 concurrent users, and everything breaks. The culprit is almost always API rate limits — the silent killer of blockchain applications.

The Problem

Every blockchain app needs data from a node. Account balances, transaction history, contract state, network status — all of it comes from API calls. In development, you are the only user. In production, every user multiplies your API consumption.

The Math

A typical Stellar dashboard page load:

  • 1 call for account balances
  • 1 call for payment history
  • 1 call for recent transactions
  • 1 call for network status
  • = 4 API calls per page load
  • With auto-refresh every 10 seconds: 24 calls per user per minute

    UsersCalls/MinutePublic Horizon LimitResult
    124100-200Fine
    5120100-200Borderline
    10240100-200Rate limited
    501,200100-200Broken

    How Rate Limits Work

    Public Endpoints

    The public Stellar Horizon (horizon.stellar.org) limits by IP address. When you exceed the limit, you get HTTP 429 responses with a Retry-After header.

    Your app does not crash — it degrades. Some requests succeed, some fail. Users see partial data, loading spinners that never complete, and stale information.

    Managed Endpoints

    Managed API providers authenticate with API keys and offer higher limits per plan:

    PlanRequests/MonthRequests/MinuteBest For
    **Free**10,00060Learning, prototyping
    **Starter**100,000-500,000200-500MVPs, early apps
    **Professional**1M-10M1,000-5,000Production apps
    **Enterprise**CustomCustomExchanges, institutions

    Optimization Strategies

    1. Cache Aggressively

    Not all data changes every second:

    DataCache DurationWhy
    Account balances5-10 secondsChanges per transaction
    Fee stats30 secondsUpdates per ledger
    Asset info5 minutesRarely changes
    Ledger historyForeverHistorical data is immutable
    Network info60 secondsSlow-changing

    2. Use Cursors, Not Full Refreshes

    Instead of re-fetching all data on every refresh, track your cursor and only fetch new records:

    // Bad: Refetch everything
    GET /accounts/{id}/payments?limit=20&order=desc
    
    // Good: Only fetch new data since last check
    GET /accounts/{id}/payments?cursor={lastCursor}&order=asc

    3. Batch Related Calls

    Use account-level endpoints instead of per-entity calls:

    // Bad: 10 separate calls
    GET /transactions/{hash1}/operations
    GET /transactions/{hash2}/operations
    ...
    
    // Good: 1 call
    GET /accounts/{id}/operations?limit=200&order=desc

    4. Reduce Refresh Frequency

    Does your dashboard need to update every second? For most use cases, 5-10 second intervals provide a good user experience while cutting API calls by 80-90%.

    5. Implement Client-Side Deduplication

    If multiple components on the same page request the same data, deduplicate at the fetch layer:

    const cache = new Map();
    
    async function cachedFetch(url, ttl = 5000) {
      const cached = cache.get(url);
      if (cached && Date.now() - cached.time < ttl) return cached.data;
    
      const data = await fetch(url).then(r => r.json());
      cache.set(url, { data, time: Date.now() });
      return data;
    }

    When to Upgrade

    You need a paid plan when:

  • You are hitting 429 errors in production
  • Your app has more than 5-10 concurrent users
  • You need consistent response times (SLA)
  • You are building for institutional users who expect reliability
  • You need support when things break
  • The Cost of Not Upgrading

  • Engineer time debugging rate limit issues: $50-150/hour
  • Lost users who see broken dashboards: Hard to quantify but real
  • Reputation damage from unreliable service: Especially costly for B2B
  • Opportunity cost of building rate limit workarounds instead of features
  • A $25-99/month managed API is almost always cheaper than the alternatives.

    Getting Started with LumenQuery

  • [Pricing](/pricing): Compare plans and find the right fit
  • [API Documentation](/docs): Complete endpoint reference
  • [Sign Up](/auth/signup): Start with the free tier — no credit card required

  • *Stop fighting rate limits. LumenQuery provides managed Stellar API with transparent rate limits and reliable performance. Start free.*