Skip to content
ChartDeck Developer API docs Account Get an API key

Pagination

Cursor paging - limit, meta.next_cursor and cursor - and which way each list walks.

A list answers one page and a cursor:

  1. Ask with limit (rows per page; each route documents its maximum).
  2. If meta.next_cursor is not null, ask again with the same parameters plus cursor=<next_cursor>.
  3. Stop when meta.next_cursor is null.

Cursors are opaque and belong to the route and parameters they came from: a cursor used elsewhere answers 400 invalid_cursor. Walking the cursors never repeats or skips a row.

Direction. Market series (candles, open interest, funding, basis, long/short ratio, large trades) page backward in time: the first page holds the newest rows, each next page the rows before. Calendar events page forward through the window; news pages from the newest story back.

Python
for bar in client.market.iter_candles(venue="binance", symbol="BTCUSDT", res="60", max_items=5000):
    ...
JavaScript
for await (const bar of cd.market.candles.iterate({ venue: 'binance', symbol: 'BTCUSDT', res: '60', maxItems: 5000 })) { /* ... */ }

Each page is a call and costs its units.

The Developer API documentation is in English.