Pagination
List endpoints return results newest first and page through them with a cursor. A cursor marks a fixed position in the list, so new records created while you page never cause you to skip or repeat a result. This is the behavior you want when you are paging through a live ledger.
Requesting a page
Two optional query parameters control paging:
| Parameter | Purpose |
|---|---|
limit |
How many results to return. The default is 50 and the maximum is 100. |
cursor |
Where to continue from. Use the next_cursor from the previous page, and omit it for the first page. |
Each response includes a pagination object:
{
"pagination": {
"limit": 50,
"has_next": true,
"next_cursor": "1287"
}
}
has_next tells you whether more results remain. next_cursor is the value to
send as cursor for the next page, and it is null on the last page.
To read a full list, keep requesting pages with the previous response's
next_cursor until has_next is false.