跳转到主要内容
POST
/
getEpochInfo
curl --request POST \
  --url https://mainnet.helius-rpc.com/ \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": "1",
  "method": "getEpochInfo",
  "params": [
    {
      "commitment": "finalized",
      "minContextSlot": 1000
    }
  ]
}'
{
  "jsonrpc": "2.0",
  "id": "1",
  "result": {
    "absoluteSlot": 166598,
    "blockHeight": 166500,
    "epoch": 27,
    "slotIndex": 2790,
    "slotsInEpoch": 8192,
    "transactionCount": 22661093
  }
}

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:getEpochInfo

要调用的 RPC 方法名称。

Available options:
getEpochInfo
Example:

"getEpochInfo"

params
object[]

请求的可选参数。

Response

成功检索到 epoch 信息。

jsonrpc
enum<string>

JSON-RPC 协议版本。

Available options:
2.0
Example:

"2.0"

id
string

与请求匹配的标识符。

Example:

"1"

result
object
I