Skip to main content
Most Pump.fun API endpoints that return lists support pagination through offset and limit parameters. This guide covers best practices for paginating through large result sets.

Basic pagination

The standard pagination pattern uses two parameters:
  • limit - Number of items to return (page size)
  • offset - Number of items to skip (starting position)

Simple pagination example

Iterate through all pages

Automatically paginate through all available results:
Python
Detect the last page by checking if the returned results are fewer than your requested limit.

Pagination with rate limiting

Implement pagination with proper rate limiting handling:
Python
Always implement delays between paginated requests to avoid rate limiting. A 0.5-1 second delay is recommended.

Pagination for trades

Paginate through trade history for a specific coin:
Python

Efficient pagination patterns

Calculate total pages

While most endpoints don’t return total counts, you can implement page counting:
Python

Resume pagination

Save progress to resume pagination later:
Python

Common pagination endpoints

Endpoints that support offset/limit pagination:
  • GET /coins - All coins with filtering
  • GET /coins/search - Search results
  • GET /coins/featured/{timeWindow} - Featured coins
  • GET /coins/currently-live - Live coins
  • GET /coins/for-you - Personalized recommendations
  • GET /coins/user-created-coins/{userId} - User’s created coins
  • GET /trades/all/{mint} - All trades for a coin
  • GET /trades/followsUserId/{mint} - Trades from followed users
  • GET /replies - All replies
  • GET /replies/{mint} - Replies for a coin
  • GET /replies/user-replies/{address} - User’s replies
  • GET /notifications - User notifications
  • GET /moderation/logs - Moderation logs
  • GET /bookmarks/{id} - Bookmark items

Best practices

1

Choose appropriate page sizes

Use 50-100 items per page for most use cases. Smaller for real-time updates, larger for bulk processing.
2

Implement exponential backoff

When encountering rate limits, use exponential backoff before retrying.
3

Add delays between pages

Wait 0.5-1 second between page requests to be respectful of API resources.
4

Handle empty results

Always check for empty arrays to detect the last page.
5

Cache results locally

Store fetched data locally to avoid re-fetching the same pages.
6

Monitor progress

Log progress during pagination to help with debugging and resumption.
The maximum recommended limit is 100. Larger values may result in timeouts or degraded performance.