Portal deweloperski
Motyw

Get Public Chain Details#

Query basic details for a specific chain, including market cap rank, consensus algorithm, mining difficulty, supply, TPS, and latest block height.

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

Request URL#

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

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.
rankStringMarket cap rank of the chain.
mineableBooleanWhether mining is supported, e.g., true / false.
algorithmStringCore algorithm, e.g., SHA-256.
consensusStringConsensus algorithm, e.g., PoW.
diffEstimationStringEstimated next mining difficulty. Unit for BTC: T.
currentDiffStringCurrent network-wide mining difficulty.
diffAdjustTimeStringTime of the next mining difficulty adjustment.
circulatingSupplyStringCirculating supply.
totalSupplyStringMaximum supply.
tpsStringOn-chain transactions processed per second, averaged over the past week.
lastHeightStringLatest block height.
lastBlockTimeStringTime of the previous block. Unix timestamp in milliseconds, e.g., 1597026383085.
issueDateStringIssue date. Unix timestamp in milliseconds, e.g., 1597026383085.

Request Example#

shell
curl --location --request GET 'https://web3.okx.com/api/v6/explorer/info/detail?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",
            "rank": "1",
            "mineable": true,
            "algorithm": "SHA-256",
            "consensus": "PoW",
            "diffEstimation": "128.42",
            "currentDiff": "126.98",
            "diffAdjustTime": "1754563200000",
            "circulatingSupply": "19891234",
            "totalSupply": "21000000",
            "tps": "5.32",
            "lastHeight": "908123",
            "lastBlockTime": "1753690007000",
            "issueDate": "1231006505000"
        }
    ]
}