Skip to main content

Pagination

Pagination in soroban-rpc is similar to pagination in Horizon.

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

  • cursor: string - (optional) A string ID that points to a specific location in a collection of responses and is pulled from the paging_token value of a record.
  • limit: number - (optional) The maximum number of records returned. The limit can range from 1 to 200 - an upper limit that is hardcoded in Soroban-RPC for performance reasons. If this argument isn't designated, it defaults to 10.

For example, calling a method with pagination parameter set:

{
"jsonrpc": "2.0",
"Id": "1",
"method": "exampleMethod",
"params": [
"other",
"arguments",
{ "cursor": "1234-1", "limit": 100 }
]
}