POST
/
getBlocks
curl --request POST \
  --url https://mainnet.helius-rpc.com/ \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": "1",
  "method": "getBlocks",
  "params": [
    5,
    10,
    {
      "commitment": "finalized"
    }
  ]
}'
{
  "jsonrpc": "2.0",
  "id": "1",
  "result": [
    5,
    6,
    7,
    8,
    9,
    10
  ]
}

Authorizations

api-key
string
query
required

您的 Helius API 密钥。您可以在仪表板中免费获取一个。

Body

application/json

Response

200
application/json

成功检索到确认的区块。

The response is of type object.