Skip to main content

Rate Limits

Rate limits control how many requests per second (RPS) you can make to Surflux services. These limits ensure fair resource allocation and platform stability for all users.

Understanding Rate Limits

Rate limits are enforced per API key using a sliding window algorithm. When you exceed your RPS cap, the API returns HTTP 429 (Too Many Requests) until your request rate drops below the limit.

Rate Limits vs Credits
  • Rate limits control request frequency (requests per second)
  • Credits control total usage (consumed per request)

You need both sufficient RPS headroom and enough credits to use Surflux APIs effectively.


Rate Limit Tiers

Different endpoints have different rate limits based on your plan tier.

Standard Indexing APIs

Applies to NFT Indexing API and DeepBook Indexing API endpoints.

PlanRPS CapUse Cases
Free10Development, testing, low-traffic apps
Builder25Production apps, moderate traffic
Scale50High-traffic apps, multiple services
Pro100Enterprise apps, heavy usage
EnterpriseCustom (≥100)Ultra-high throughput, custom needs

Examples:

  • Fetching NFT data: /nfts/address/:address
  • Querying order books: /deepbook/:poolName/order-book-depth
  • Historical trades: /deepbook/:poolName/trades

gRPC API

gRPC has separate rate limits to account for its high-performance nature.

PlanRPS CapUse Cases
Free20Development, testing
Builder40Production gRPC applications
Scale100High-frequency queries
Pro200Real-time data pipelines
EnterpriseCustom (≥200)Custom infrastructure

Common gRPC use cases:

  • Blockchain state queries
  • Transaction indexing
  • Custom protocol integration

Flux Streams

Flux Streams have a different type of limit: concurrent connections.

PlanMax Concurrent Streams
Free1
Builder3
Scale10
Pro25
EnterpriseCustom (≥25)

Each active SSE connection counts toward your limit, regardless of data throughput.


Monitoring Rate Limits

Dashboard

Track your rate limit usage in real-time:

  • Current RPS across all endpoints
  • Peak RPS over last 24 hours
  • 429 error rate
  • Active Flux Stream connections

View Dashboard →

Response Headers

Every API response includes rate limit information:

X-RateLimit-Limit: 25
X-RateLimit-Remaining: 18
X-RateLimit-Reset: 1678901234

Fields:

  • Limit: Your RPS cap
  • Remaining: Requests available in current window
  • Reset: Unix timestamp when limit resets

Frequently Asked Questions

Are rate limits per API key or per account?

Rate limits are enforced per API key. Creating multiple API keys doesn't increase your total capacity; limits are shared across all keys in your account.

Do retries count toward rate limits?

Yes. Every request counts, including retries. Implement exponential backoff to avoid compounding rate limit issues.

Can I request a temporary rate limit increase?

Enterprise customers can request temporary increases for product launches or special events. Contact your account manager.

How are concurrent streams counted?

Each active SSE connection counts as one stream, regardless of data throughput or event volume. Disconnecting and reconnecting doesn't increase the count.

What's the rate limit for WebSocket alternatives?

Surflux uses Server-Sent Events (SSE) for streaming, not WebSockets. SSE connections are limited by your plan's concurrent stream count, not RPS.


Next Steps