Cursor pagination

Also called: continuation token

Paging through a list by sending back a token from the previous page instead of a page number.

What it means

With cursor pagination the server answers with one page of results and a token that marks where that page ended. The client sends the token back to get the next page. Unlike page numbers or offsets, the client never does arithmetic, and the server is free to change how it counts underneath.

How Onekey handles it

Every list that pages returns pagination: {next_cursor, has_more, page_size}, whatever the platform. Send next_cursor back verbatim as cursor with the same other parameters. The cursor is a signed token bound to the endpoint and the query, so an altered or reused one is refused with 422 INVALID_CURSOR, free. Each page is a separate call at the endpoint price.

Read more

Related terms

← All terms