RPC MethodsHTTPgetBlocksWithLimit

Block

getBlocksWithLimit

Returns a list of confirmed blocks starting at the given slot.

Parameters

startSlotu64 required

Start slot.

limitu64 required

Limit, as u64 (must be no more than 500,000).

configobject optional

Configuration object.

commitmentstring

Commitment level.

Result

array

Array of u64 integers listing confirmed blocks.

Example

Request
JSON
curl "https://eu.fluxrpc.com?key=<your-API-key>" -s -X POST -H "Content-Type: application/json" -d '
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getBlocksWithLimit",
  "params": [5, 3, { "commitment": "finalized" }]
}'
Response
JSON
{
"jsonrpc": "2.0",
"result": [
5,
6,
7
],
"id": 1
}