getBlocks
Returns a list of confirmed blocks between two slots
Parameters
Start Slot <u64>
- slot number, as
u64
integer
End Slot <u64>
(optional)
- end slot, as
u64
integer (must be no more than 500,000 blocks higher than thestart_slot
)
Result
The result field will be an array of u64 integers listing confirmed blocks
between start_slot
and either end_slot
- if provided, or latest confirmed
block, inclusive. Max range allowed is 500,000 slots.
Code sample
curl "https://testnet.atlas.xyz/?apikey=$ATLAS_API_KEY" -X POST -H "Content-Type: application/json" -d '
{
"jsonrpc": "2.0",
"id": "0bdba4c1-3073-41b0-b849-46f14e004e38",
"method": "getBlocks",
"params": [
11130750,
11130760
]
}
'
Response
{
"jsonrpc": "2.0",
"id": "0bdba4c1-3073-41b0-b849-46f14e004e38",
"result": [
11130750, 11130751, 11130752, 11130753, 11130754, 11130755, 11130756,
11130757, 11130758, 11130759, 11130760
]
}