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:
- Call the route and read
nextCursorfrom the response. - If
nextCursoris a string, send it back unchanged ascursoron the next call. - If
nextCursorisnull, you have the last page.
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.