Pagination

All list endpoints use cursor based pagination. The SDK handles page fetching transparently.

Auto Pagination

Iterating over any list method automatically fetches subsequent pages. Use to_list to collect all results or to_dataframe to load directly into pandas. Use first_page to fetch a single page without auto pagination.

Iterator methods
for ... in
Yields items across all pages.
to_listlist
Collects all pages into a list.
to_dataframeDataFrame
Loads all pages into a pandas DataFrame.
first_pagelist
Returns the first page only. No further requests.
takeint (kwarg)
Caps iteration at N items total. Client-side; not a query param.
python
from datetime import datetime, timedelta, timezone for market in client.markets.list( q="bitcoin", status="active", ): print(market.question) events = client.events.list( series_id="a54be2bf-3198-5f30-ad1b-68ee299fdbce", take=10, ) end = datetime.now(timezone.utc) - timedelta(days=1) [market] = client.markets.list( series_id="btc-up-or-down-5m", status="resolved", close_before=end, sort="-close_time", take=1, ) trades = client.markets.trades( market.id, after=end - timedelta(minutes=10), before=end, ).to_dataframe() series = client.series.list(take=5)

Cursor Pagination

Paginated responses include a meta object with a cursor string and has_more flag. Pass the cursor value as a query parameter in the next request to fetch the following page. Cursors are opaque and expire after 24 hours.

Query parameters
limitint
Page size, rows the server returns per request. Maximum varies by endpoint. Pagination continues via cursor until exhausted.
cursorstr
Opaque cursor from a previous response.
orderstr
"asc" or "desc". Controls sort direction on time series endpoints.
Response meta
cursorstr | null
Cursor for the next page. Null if no more pages.
has_morebool
Whether additional pages exist.
jsonResponse
{ "data": [ { "id": "8150b888...", "question": "..." } ], "meta": { "cursor": "eyJpZCI6IjEyMzQiLCJ0IjoxNzEwNDAwMDAwfQ==", "has_more": true } }