Geliştirici portalı
Tema

Get Basic Hash Rate Information#

Query basic network hash rate information for a specific chain, including the past week's network hash rate and its 24-hour change. Only PoW chains provide meaningful hash rate data.

Supported chains: see Get Chain Info API Supported Chains (apiName: hashes).

Request URL#

GET
https://web3.okx.com/api/v6/explorer/info/hashes

Request Parameters#

ParameterTypeRequiredDescription
chainIndexStringYesUnique identifier of the chain, e.g., 1 for ETH, 0 for BTC. See Get Chain Info API Supported Chains for supported values.

Response Parameters#

ParameterTypeDescription
chainIndexStringUnique identifier of the chain.
symbolStringNative token of the chain.
hashRateStringNetwork hash rate over the past week.
hashRateChange24hString24-hour change in network hash rate, expressed as a decimal.

Request Example#

shell
curl --location --request GET 'https://web3.okx.com/api/v6/explorer/info/hashes?chainIndex=0' \
--header 'OK-ACCESS-KEY: 37c541a1-****-****-****-10fe7a038418' \
--header 'OK-ACCESS-SIGN: leaV********3uw=' \
--header 'OK-ACCESS-PASSPHRASE: 1****6' \
--header 'OK-ACCESS-TIMESTAMP: 2023-10-18T12:21:41.274Z'

Response Example#

json
{
    "code": "0",
    "msg": "",
    "data": [
        {
            "chainIndex": "0",
            "symbol": "BTC",
            "hashRate": "745.62 EH/s",
            "hashRateChange24h": "0.0231"
        }
    ]
}