Pagination
List endpoints page with an opaque cursor:
# First pagecurl "https://rest.haasapi.com/v1/markets?limit=3000" -H "$AUTH"
# Next page - pass the previous response's next_cursorcurl "https://rest.haasapi.com/v1/markets?limit=3000&cursor=bTE6MzAwMA" -H "$AUTH"Every list response has the same envelope:
{ "data": [ … ], "next_cursor": "bTE6MzAwMA" // null on the last page}The rules
Section titled “The rules”- Follow
next_cursoruntil it isnull. That is the entire protocol. - Cursors are opaque. Never construct, decode, or modify one - a cursor you didn’t get
from a response is rejected with
400 invalid_cursor. - Limits are generous by design.
/v1/marketsdefaults to its maximum (3000), sized so one exchange always fits in a single page. You only paginate when walking everything. - A cursor belongs to its query: changing filters mid-walk gives undefined results - restart from the first page instead.