跳转到主要内容
POST
/
getSlot
curl --request POST \
  --url https://mainnet.helius-rpc.com/ \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": "1",
  "method": "getSlot",
  "params": [
    {
      "commitment": "finalized"
    }
  ]
}'
{
  "jsonrpc": "2.0",
  "id": "1",
  "result": 1234
}

Authorizations

api-key
string
query
required

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

Body

application/json
jsonrpc
enum<string>
default:2.0

JSON-RPC协议版本。

Available options:
2.0
Example:

"2.0"

id
string
default:1

请求的唯一标识符。

Example:

"1"

method
enum<string>
default:getSlot

要调用的RPC方法名称。

Available options:
getSlot
Example:

"getSlot"

params
object[]

可选的配置对象。

Response

成功检索到当前插槽。

jsonrpc
enum<string>

JSON-RPC 协议版本。

Available options:
2.0
Example:

"2.0"

id
string

与请求匹配的标识符。

Example:

"1"

result
integer

当前 Solana 区块链插槽号,表示网络的高度和进度。

Example:

1234

I