API
Pagination
Long results come one page at a time. Follow the opaque cursor the response gives you, and stop when there is none.
Cursors
Operations that can return more than one page — stock bars, off-exchange views, some lists — put an opaque cursor in meta.cursor when there is more to read:
{ "data": [ "…" ], "meta": { "cursor": "eyJ0IjoxNzkw…" } }To read the next page, repeat the same request with cursor=<that value> added. The cursor encodes where you were; do not build or edit one.
curl -sS -G "https://api.itmatrixhq.com/v2/stocks/SPY/bars" \
-H "Authorization: Bearer $ITM_API_KEY" \
-d "from=2026-09-01" -d "to=2026-09-26" -d "timeframe=1m" \
-d "cursor=eyJ0IjoxNzkw…"Rules for a correct loop
- Stop when
meta.cursoris missing ornull. That is the last page. - Stop if a cursor repeats. A loop that sees the same cursor twice is not making progress.
- Bound the loop — pages and rows — so a mistake cannot run forever.
- Do not treat the first page as the whole range. A month of 1-minute bars is several pages.
limit, where an operation takes it, sets the page size up to a documented maximum; the server clamps larger values.
In the SDKs
The SDK bar helpers return one page and leave the cursor visible (meta.cursor in TypeScript, result.data.cursor or result.meta["cursor"] in Python). Pass it back as cursor on the next call. The period helpers (get_bars_for_period, getBarsForPeriod) also return a single page — check the cursor before calling a month complete.