⚡ We welcome businesses to test our enterprise-grade service

btc
Bitcoin (BTC)

Method: POST getnetworkhashps

dropdown

方法 RPC getnetworkhashps 例如 Bitcoin (BTC)

POST getnetworkhashps

返回基于最后 n 个块的每秒估计网络哈希值。

传入 [blocks] 以覆盖块数,-1 指定自上次难度更改以来。

传入[height]来估计找到某个区块时的网速。

Parameters

nblocks - 数字,可选,默认值=120

自上次难度更改以来的块数,或 -1 表示块。

height - 数字,可选,默认=-1

估计在给定高度的时间。

Request

curl --location --request POST 'https://btc.getblock.io/mainnet/' 
--header 'x-api-key: YOUR-API-KEY' 
--header 'Content-Type: application/json' 
--data-raw '{"jsonrpc": "2.0",
"method": "getnetworkhashps",
"params": [null, null],
"id": "getblock.io"}'


Response

{
    "error": null,
    "id": "getblock.io",
    "result": 2.333876557488516e+18
}