開發者平臺
主題

获取公链详情#

查询指定公链的基础详情,包括市值排名、共识算法、挖矿难度、供应量、TPS 与最新区块高度等信息。

支持的链:见获取公链信息 API 支持的链apiNamedetail)。

请求地址#

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

请求参数#

参数名类型是否必填描述
chainIndexString链唯一标识,如 ETH 为 1、BTC 为 0;支持范围见获取公链信息 API 支持的链

响应参数#

参数名类型描述
chainIndexString链唯一标识
symbolString公链原生代币
rankString公链市值排名
mineableBoolean是否支持挖矿,例如:true / false
algorithmString核心算法,例如:SHA-256
consensusString共识算法,例如:PoW
diffEstimationString下次挖矿难度预测,BTC 的单位:T
currentDiffString当前全网挖矿难度
diffAdjustTimeString下次挖矿难度调整时间
circulatingSupplyString流通量
totalSupplyString最大供应量
tpsString链上每秒交易处理数量,近一周平均值
lastHeightString最新区块高度
lastBlockTimeString上一个区块时间;Unix 时间戳的毫秒数格式,如 1597026383085
issueDateString发行日期;Unix 时间戳的毫秒数格式,如 1597026383085

请求示例#

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'

响应示例#

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"
        }
    ]
}