Skip to main content

0.05 credits per call

getBlocksWithLimit on Solana: Returns a list of confirmed blocks starting at a slot, up to a limit.

Endpoint

https://rpc.goldrushdata.com/v1/solana-mainnet
Authenticate with Authorization: Bearer <GOLDRUSH_API_KEY>. See authentication.

Parameters

NameTypeRequiredDescriptionExample
startSlotu64yesFirst slot to include (inclusive).372877000
limitu64yesMaximum number of blocks to return (must be no greater than 500,000).5
configobjectno{commitment?}. processed is not supported.{"commitment":"finalized"}

Returns

array<u64>: Array of confirmed block slots in ascending order.
[372877000, 372877001, 372877003, 372877004, 372877005]

Examples

curl https://rpc.goldrushdata.com/v1/solana-mainnet \
  -H "Authorization: Bearer $GOLDRUSH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getBlocksWithLimit",
    "params": [372877000, 5, {"commitment":"finalized"}]
  }'

Errors

Standard JSON-RPC errors: -32600 invalid request, -32601 method not found, -32602 invalid params.