pagination block on the response envelope:
pagination_key into the next call, or use the paginate helper to iterate through every item as a stream.
paginate
paginate(fetcher, params, pageSize?) is an async generator that lazily pulls each page and yields individual items. It terminates when the server reports has_more: false or returns a null pagination_key.
Any list-style namespace method works:
Early termination
You can stop iterating at any time. Exiting thefor await loop stops fetching the next page, so you only pay for what you read.
Manual pagination
If you prefer to walk pages yourself (for example, to render a paginated UI), skip the helper and drive the cursor directly:Offset vs pagination_key
A few endpoints (the trader trades and PnL methods) also accept an offset param that skips a fixed number of rows. It exists for one case: server-rendered, deep-linkable pages, where ?page=42 maps to offset=4100 and you need to render that slice on the first request without replaying every page to obtain a cursor.
offset is capped at a few thousand rows (typically in the 3,000 to 5,000 range), so it cannot reach deep into a large dataset. For everything else, prefer pagination_key. Cursor pagination is the right default for any programmatic consumer, while offset is reserved for rendering a specific page directly from a URL.
The paginate helper always uses cursor pagination, so it never sends an offset.
See the API Reference for the underlying query parameters.
For a complete worked backfill, see Fetching an entire dataset.