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
Pagination with rate limiting
Implement pagination with proper rate limiting handling:Python
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:Coins endpoints
Coins endpoints
GET /coins- All coins with filteringGET /coins/search- Search resultsGET /coins/featured/{timeWindow}- Featured coinsGET /coins/currently-live- Live coinsGET /coins/for-you- Personalized recommendationsGET /coins/user-created-coins/{userId}- User’s created coins
Trades endpoints
Trades endpoints
GET /trades/all/{mint}- All trades for a coinGET /trades/followsUserId/{mint}- Trades from followed users
Replies endpoints
Replies endpoints
GET /replies- All repliesGET /replies/{mint}- Replies for a coinGET /replies/user-replies/{address}- User’s replies
Other endpoints
Other endpoints
GET /notifications- User notificationsGET /moderation/logs- Moderation logsGET /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.