New: getTransactionsForAddress - Query transaction history with advanced filtering, sorting, and pagination. Learn More
简体中文
返回两个插槽之间的已确认区块列表。
cURL
curl --request POST \ --url 'https://mainnet.helius-rpc.com/?api-key=' \ --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 ] }
您的 Helius API 密钥。您可以在仪表板中免费获取一个。
JSON-RPC协议版本。
2.0
"2.0"
请求的唯一标识符。
"1"
要调用的RPC方法名称。
getBlocks
"getBlocks"
方法的请求参数。
起始槽(必需)。
5
成功检索到确认的区块。
与请求匹配的标识符。
在 start_slot 和 end_slot 之间确认的区块列表。
[5, 6, 7, 8, 9, 10]
此页面对您有帮助吗?