跳转到主要内容
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
  ]
}'

请求体

application/json
method
enum<string>
默认值:getBlocksWithLimit
必填
可用选项:
getBlocksWithLimit
jsonrpc
enum<string>
默认值:2.0
必填
可用选项:
2.0
params
(string | object)[]
必填

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

Required array length: 1 - 2 elements
id
默认值:1
必填

响应

200 - application/json

Successful response

jsonrpc
enum<string>
默认值:2.0
必填
可用选项:
2.0
id
必填
result
integer[]

Array of confirmed slot numbers.