Fetching Data & Pagination
How to efficiently retrieve and paginate through large datasets.
Pagination
Endpoints that return large result sets support limit and offset parameters. The default limit is 500 rows, with a maximum of 5,000 per request.
| Parameter | Type | Default | Max | Description |
|---|---|---|---|---|
limit | integer | 500 | 5,000 | Maximum rows to return |
offset | integer | 0 | - | Number of rows to skip |
Paginate through snapshots
# Page 1
GET /v1/markets/{id}/snapshots?limit=500&offset=0
# Page 2
GET /v1/markets/{id}/snapshots?limit=500&offset=500
# Page 3
GET /v1/markets/{id}/snapshots?limit=500&offset=1000Time-Range Filtering
Use from and to parameters to restrict results to a specific time window.
Fetch snapshots for a specific hour
GET /v1/markets/{id}/snapshots?from=2026-03-10 14:00:00&to=2026-03-10 15:00:00Timestamp Format
All timestamps use YYYY-MM-DD HH:MM:SS or YYYY-MM-DD HH:MM:SS.mmm format in UTC.
Filtering
| Filter | Values | Applies To |
|---|---|---|
category | crypto, sports, economics, weather | Markets, History endpoints |
subcategory | BTC, NBA, FOMC, NYC, etc. | Markets, History endpoints |
crypto | BTC, ETH, SOL, XRP | Most endpoints (legacy) |
timeframe | 5m, 15m, 1h, 1d | Most endpoints |
side | UP, DOWN | Snapshot endpoints |
Response Structure
Paginated responses include metadata to help you iterate through results:
Paginated response shape
{
"market_id": "0x...",
"total": 54000, // Total matching rows
"limit": 500, // Current page size
"offset": 0, // Current offset
"data": [...] // Array of results
}