Skip to main content
Order history and closed round trips come back one page at a time, newest first. Each page carries a cursor that fetches the next one. Use this page when you read an account’s full history. A page holds 100 rows unless you send a limit: from 1 to 200 on GET /api/account/orders/history, and from 1 to 500 on GET /api/account/pnl/round-trips. The loop has three steps:
  1. Call the route and read nextCursor from the response.
  2. If nextCursor is a string, send it back unchanged as cursor on the next call.
  3. If nextCursor is null, you have the last page.
The loop ends on the page whose nextCursor is null, with every order in rows. Treat a cursor as opaque. Don’t parse it, build one, or keep it between sessions. A malformed cursor is refused with 400 rather than quietly starting you from page one, so a bug in your pager shows up as an error instead of duplicate rows. Each page starts after the last row of the one before, so new rows arriving while you page never shift your pages. You won’t see the same order twice because something filled while you were reading.