Returns a list of confirmed blocks starting at the given slot
Supported on Solana (mainnet) only.
Parameters
<u64>
- start_slot, as u64 integer<u64>
- limit, as u64 integer (must be no more than 500,000 blocks higher than thestart_slot
)- (optional)
<object>
- Configuration object containing the following field:- (optional)
commitment: <string>
- Commitment; "processed" is not supported. If parameter not provided, the default is "finalized".
- (optional)
Returns
The result field will be an array of u64 integers listing confirmed blocks starting at start_slot for up to limit blocks, inclusive.
API Endpoint
The format of an Solana API endpoint is
https://open-platform.nodereal.io/{{apiKey}}/solana/
Here is an example:
https://open-platform.nodereal.io/4c0a1c23661a4e26bcbcwed461e34ea9/solana/
Example
Request
curl https://open-platform.nodereal.io/{{apiKey}}/solana/ \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0","id":1,"method":"getBlocksWithLimit","params":[5, 3]}'
Result
{ "jsonrpc": "2.0", "result": [5, 6, 7], "id": 1 }