Skip to content
KelkiDevelopers

Pagination

Lists (GET /trades, GET /requests, GET /trades/{trade_id}/services…) are paginated by cursor: pages stay stable even if requests arrive between two calls.

Parameters and response

{"object": "list", "data": [ … ], "has_more": true, "next_cursor": "cur_…"}

The Link: <…>; rel="next" header (RFC 8288) also gives the address of the next page.

Example loop (Python)

cursor, requests_ = None, []
while True:
    q = "?limit=100" + (f"&starting_after={cursor}" if cursor else "")
    page = call("GET", "/requests" + q)
    requests_ += page["data"]
    if not page["has_more"]:
        break
    cursor = page["next_cursor"]

The call function: code examples. GET /requests returns the requests of the key's account and mode, most recent first.