Skip to main content
You can read history in two ways. Pick by size.

Pages

Lists and history endpoints return one page at a time, with next_cursor. Pass it back as cursor, with the same parameters, until it is null. limit sets the page size: up to 1,000 items on lists (100 by default); each history endpoint’s reference gives its own.
Cursors are opaque, tied to the request that produced them, and valid for 24 hours. On history endpoints, a paging run serves the data available when its first page was served, so its pages never skip or repeat a row (unless the data is corrected while you page). Data that arrives later appears when you request again. The Python SDK pages for you: client.iter_market_prices(...) yields every row of every page.

Streams

History and tick endpoints also stream: one request returns every row of the window, however many there are. Send one of these Accept headers: Books stream as NDJSON only. Discovery and lifecycle don’t stream. Send Accept-Encoding: gzip for large streams. A stream costs what one page of its endpoint costs, and covers a longer window than a page: Streams carry rows only. For Kalshi data, the attribution and the data type come in the Qelso-Attribution and Qelso-Data-Type response headers.

When a stream breaks

A stream that ends normally has delivered every row we hold for the window. If anything fails after the first byte, the connection closes without finishing the response, so your HTTP client raises an error rather than ending quietly. Resume with after= set to the last row you received:
Take the values from the last complete line, exactly as they were written (with outcome=no, the row’s own side and price); a partial last line isn’t a row. A resumed book-changes stream skips the starting book, so if it breaks before its first update row, start again without after.
The Python SDK’s stream_* methods do all of this: they resume a broken stream by themselves, without repeating or skipping a row, and wait out an outage once rows are flowing. save(path) writes a stream to a file (and save(path, resume=True) carries on one that failed), and to_pandas() reads it into a DataFrame.