Skip to main content
List endpoints return a page of results plus a nextPageToken cursor. The paginateOrders and paginateRebalances helpers follow that cursor for you and yield individual items, so you can for await over the full history without handling tokens yourself.
Both helpers accept the same filters as their list endpoint (minus the page cursor) and stop automatically once the last page is reached. Each request still throws a RequestError on failure. If you need raw pages or the nextPageToken directly, call client.listOrders() and client.listRebalances() instead.