Skip to main content
POST
curl --request POST \
  --url https://devnet-as.magicblock.app/ \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getBlocksWithLimit",
  "params": [
    5,
    3
  ]
}'
{
  "jsonrpc": "2.0",
  "result": [
    5,
    6,
    7
  ],
  "id": 1
}
curl --request POST \
  --url https://devnet-as.magicblock.app/ \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getBlocksWithLimit",
  "params": [
    5,
    3
  ]
}'

Body

application/json
method
enum<string>
default:getBlocksWithLimit
required
Available options:
getBlocksWithLimit
jsonrpc
enum<string>
default:2.0
required
Available options:
2.0
params
(string | object)[]
required

Start slot and limit. See Solana RPC docs for exact shape.

Required array length: 1 - 2 elements
id
default:1
required

Response

200 - application/json

Successful response

jsonrpc
enum<string>
default:2.0
required
Available options:
2.0
id
required
result
integer[]

Array of confirmed slot numbers.