Skip to main content

Overview

The Pump.fun API implements rate limiting to ensure fair usage and maintain service stability. Rate limits restrict the number of requests you can make within a specific time window. Understanding and respecting these limits is crucial for building reliable applications.
Exceeding rate limits results in 429 Too Many Requests errors. Implement proper rate limiting in your application to avoid service disruptions.

Rate Limit Headers

The API includes rate limiting information in response headers. Check these headers to monitor your usage:
integer
The maximum number of requests allowed in the current time window.
integer
The number of requests remaining in the current time window.
timestamp
The time when the rate limit window resets (Unix timestamp).

Example Response Headers

Rate Limit Response

When you exceed the rate limit, the API returns a 429 Too Many Requests status code:
The Retry-After header indicates how many seconds to wait before making another request.

Checking Rate Limits

Monitor rate limit headers in your application to avoid hitting limits:

Rate Limiting Strategies

Token Bucket Algorithm

Implement a token bucket to control request rates:

Request Queue

Queue requests and process them at a controlled rate:

Best Practices

Always check the x-ratelimit-* headers in responses to track your usage and adjust request rates accordingly.
When you receive a 429 error, wait before retrying. Use exponential backoff (1s, 2s, 4s, 8s) to avoid hammering the API.
When rate limited, always respect the Retry-After header value. Don’t retry before this time has elapsed.
Some endpoints support batch operations. Use them to reduce the number of individual requests.
Implement caching with ETags to reduce unnecessary requests. See the Caching guide for details.
Avoid bursts of requests. Spread requests evenly throughout the rate limit window.
Instead of polling endpoints repeatedly, use webhooks or server-sent events when available to receive updates.

Rate Limit Tiers

Rate limits may vary by endpoint and authentication level. Higher tier accounts or specific endpoints may have different limits.

General Guidelines

  • Unauthenticated requests: Lower rate limits apply
  • Authenticated requests: Standard rate limits based on account tier
  • Admin endpoints: May have separate, stricter rate limits
  • Read operations: Generally higher limits than write operations
  • Batch endpoints: May have different limits than single-item endpoints

Handling Rate Limit Errors

When you encounter a 429 error:
  1. Stop sending requests immediately - Don’t continue making requests
  2. Check the Retry-After header - Wait the specified number of seconds
  3. Implement exponential backoff - If no Retry-After header, use exponential backoff
  4. Log the incident - Track rate limit errors to identify patterns
  5. Adjust your application - Reduce request rate to stay within limits
Repeated rate limit violations may result in temporary or permanent API access restrictions. Always respect rate limits and implement proper throttling.

Testing Rate Limits

When testing your rate limiting implementation: