Pagination, Filtering, and Sorting
Master efficient data retrieval with pagination, filtering, and sorting. Learn how to optimize queries and reduce API calls using query parameters.
Pagination
Smart Money API uses cursor-based pagination for efficient data retrieval. Specify page number and limit to control result sets.
| Parameter | Type | Default | Max |
|---|---|---|---|
| page | integer | 1 | N/A |
| limit | integer | 50 | 500 |
Pagination Example
Response Pagination Info
Filtering
Filter results by symbol, exchange, direction, and other criteria. Filters are combined with AND logic.
| Filter | Values | Example |
|---|---|---|
| symbol | Trading pair | BTCUSDT, ETHUSDT |
| exchange | bybit, binance, hyperliquid | bybit |
| direction | long, short | long |
| min_position_size | Number | 10.5 |
| min_pnl_percent | Number | 2.0 |
Filtering Example
Sorting
Sort results by position size, P&L, or other fields. Specify field and direction (asc/desc).
Complete Examples
Python: Iterate Through All Pages
Best Practices
1. Use maximum limit (100-500): Fewer API calls to retrieve same amount of data. Batch results efficiently.
2. Filter server-side: Use query parameters to filter at source, not in your application code. Reduces data transfer.
3. Sort on the server: Request sorted results from the API. Sorting at scale is efficient on the server.
4. Cache and paginate: Cache results locally and paginate through cached data to minimize API calls.
5. Stop early if possible: Don't always fetch all pages. Stop when you have enough data for your use case.
Learn More
Explore the complete API reference for all filtering and sorting options.
View REST API Reference