Skip to main content
Order lists return a page of results plus a nextPageToken cursor. The paginatePolymarketOrders and paginateKalshiOrders helpers follow that cursor for you and yield individual orders, 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.polymarket.listOrders() or client.kalshi.listOrders() instead. Positions and fills are not cursored. listPositions() and getOrderFills(orderId) return their full result in one call.