Skip to content

Pagination

List endpoints page with an opaque cursor:

Terminal window
# First page
curl "https://rest.haasapi.com/v1/markets?limit=3000" -H "$AUTH"
# Next page - pass the previous response's next_cursor
curl "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
}
  • Follow next_cursor until it is null. 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/markets defaults 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.