Pagination
Collection endpoints, including Accounts and Market Instruments, return results in pages. Use the returned cursor to continue through the results. Each resource guide describes its ordering and supported filters.
Start a traversal
Send the first request without a cursor. The limit parameter defaults to 50 and accepts values from 1 through 200. Include any supported filters in this initial request.
For example:
GET /v1/accounts?limit=50
Read the page
Every collection response contains:
| Field | Meaning |
|---|---|
items | The resources returned on this page. An empty array is a valid result. |
page.hasMore | Whether another page is available. |
page.nextCursor | The cursor for the next request, or null when hasMore is false. |
There are no page numbers or total counts. An empty result returns 200 OK, for example:
{
"items": [],
"page": {
"nextCursor": null,
"hasMore": false
}
}
Continue through the results
When page.hasMore is true, call the same endpoint with only cursor as a query parameter. Use the exact value of page.nextCursor and send the Authorization header with every page request.
GET /v1/accounts?cursor=RETURNED_CURSOR
Replace RETURNED_CURSOR with the value from the response and let your HTTP client encode it as a query parameter. Use the new cursor from each response until page.hasMore is false.
The cursor retains the original page size, ordering and filters. Do not repeat limit or filters on continuation requests. To change them, start a new traversal without a cursor.
Cursor validity
Treat cursors as opaque values. Do not construct, decode or modify them. A cursor belongs to its API major, endpoint, request context and Mapped Profile. Credential rotation for the same Profile preserves the traversal. You cannot transfer a cursor to another Profile or endpoint.
Each cursor expires one hour after creation. If a cursor is invalid or has expired, restart from the initial request with your desired page size and filters.
Changes during a traversal
Each request reads current data and applies current access permissions. The API does not keep a snapshot across pages. Changes to resources, visibility or ordering values can affect later pages, so a traversal does not represent the data at one instant.
Request failures
| Input | Response and action |
|---|---|
A limit value that cannot be parsed as an integer | 400 invalid-request; supply a valid integer. |
A parsed integer limit outside 1–200 | 422 validation-failed with a /limit violation; choose a value in range. |
cursor combined with limit or filters | 400 invalid-request; send only the cursor. |
| Blank, modified, expired or context-mismatched cursor | 400 invalid-cursor; restart without a cursor. |
See the resource's guide for additional query restrictions and Errors and problem codes for the common error format and catalogue.