Skip to main content

Pagination

For methods which support it, the pagination arguments are passed as a final object argument with two values:

  • cursor: string - (optional) An opaque string which acts as a paging token. Each response will include a cursor field which can be included in a subsequent request to obtain the next page of results.
  • limit: number - (optional) The maximum number of records returned. Each paginated method has a method-specific range and default.
MethodLimit rangeDefault limit
getEvents1 to 10000100
getLedgers1 to 20050
getTransactions1 to 20050

These upper limits are hardcoded in Stellar RPC for performance reasons.

For example, calling a method with pagination parameter set:

{
"jsonrpc": "2.0",
"id": "1",
"method": "exampleMethod",
"params": {
"some": "argument",
"pagination": {
"cursor": "1234-1",
"limit": 100
}
}
}