跳转到主要内容
POST
Run `getBlocks`
curl --request POST \
  --url 'https://rpc-mainnet.solanatracker.io/?api_key=' \
  --header 'Content-Type: application/json' \
  --data '
{
  "jsonrpc": "2.0",
  "id": "db16f277-1a22-41ff-9f85-f37e2cd77900",
  "method": "getBlocks",
  "params": [
    5,
    10,
    {
      "commitment": "finalized"
    }
  ]
}
'
{
  "jsonrpc": "2.0",
  "id": "db16f277-1a22-41ff-9f85-f37e2cd77900",
  "result": [
    5,
    6,
    7,
    8,
    9,
    10
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.solanatracker.io/llms.txt

Use this file to discover all available pages before exploring further.

授权

api_key
string
query
必填

请求体

application/json
jsonrpc
enum<string>
默认值:2.0
必填

The JSON-RPC protocol version.

可用选项:
2.0
示例:

"2.0"

id
string
默认值:1
必填

A unique identifier for the request.

示例:

"1"

method
enum<string>
默认值:getBlocks
必填

The name of the RPC method to invoke.

可用选项:
getBlocks
示例:

"getBlocks"

params
integer · integer · object[]
必填

Request parameters for the method.

Start slot (required).

示例:

5

响应

Successfully retrieved confirmed blocks.

jsonrpc
enum<string>
可用选项:
2.0
示例:

"2.0"

id
string

Identifier matching the request.

示例:

"1"

result
integer[]

List of confirmed blocks between start_slot and end_slot.

示例:
[5, 6, 7, 8, 9, 10]