Pagination and filters
Lists come in three shapes. The reference for each endpoint says which it uses.
Offset pages with a total
Section titled “Offset pages with a total”GET /v1/investments, GET /v1/accounts/{id}/orders and GET /v1/firms/{firmId}/strategies/universe take limit
and offset and return total, how many match across all pages.
curl "$IDEALX_API/v1/accounts/$ACCOUNT/orders?status=done&limit=50&offset=100" -H "Authorization: Bearer $IDEALX_API_KEY"{ "orders": [ … ], "total": 412 }GET /v1/accounts/{id}/orders without any filter returns the latest 100 orders; with any filter, limit or
offset it is filtered and paged on the server (up to 5,000 matching). The strategy universe answers
total: null with more: true when it cannot count cheaply; keep paging while more is true.
Cursor pages
Section titled “Cursor pages”The activity feeds, GET /v1/accounts/{id}/activity and GET /v1/accounts/{id}/digital-assets/activity, use a
cursor. Pass the previous page’s nextCursor as cursor until it is null. Ask for facets=false on later pages.
async function* activity(accountId: string, params: Record<string, string> = {}) { let cursor: string | null = null; do { const q = new URLSearchParams({ ...params, limit: "200", ...(cursor ? { cursor, facets: "false" } : {}) }); const res = await fetch(`${base}/v1/accounts/${accountId}/activity?${q}`, { headers }); const page = await res.json(); yield* page.items; cursor = page.nextCursor; } while (cursor);}
for await (const item of activity("acc_…", { period: "fy" })) console.log(item.at, item.title);def activity(account_id: str, **params): cursor = None while True: q = {**params, "limit": 200, **({"cursor": cursor, "facets": "false"} if cursor else {})} page = requests.get(f"{base}/v1/accounts/{account_id}/activity", params=q, headers=headers, timeout=30).json() yield from page["items"] cursor = page.get("nextCursor") if not cursor: break
for item in activity("acc_…", period="fy"): print(item["at"], item["title"])The cursor is opaque and tied to the filters it was made with: keep the same filters for every page.
Windows and complete lists
Section titled “Windows and complete lists”Statements, tax and accounting reports take a from/to window (or a tax year) and return everything in it.
GET /v1/accounts/{id}/transactions takes a limit (up to 200) for the newest transactions. Short lists, such as
accounts, clients, proposals and strategies, come complete.
Filters
Section titled “Filters”- Comma-separated lists filter on any of their values:
kind=buy,sell,status=pending,approval. - Days are
YYYY-MM-DD;tois included. - Lists of states and kinds can grow within v1: ignore values you do not know rather than failing.