获取公链详情#
查询指定公链的基础详情,包括市值排名、共识算法、挖矿难度、供应量、TPS 与最新区块高度等信息。
支持的链:见获取公链信息 API 支持的链(apiName:detail)。
请求地址#
GET
https://web3.okx.com/api/v6/explorer/info/detail请求参数#
| 参数名 | 类型 | 是否必填 | 描述 |
|---|---|---|---|
| chainIndex | String | 是 | 链唯一标识,如 ETH 为 1、BTC 为 0;支持范围见获取公链信息 API 支持的链 |
响应参数#
| 参数名 | 类型 | 描述 |
|---|---|---|
| chainIndex | String | 链唯一标识 |
| symbol | String | 公链原生代币 |
| rank | String | 公链市值排名 |
| mineable | Boolean | 是否支持挖矿,例如:true / false |
| algorithm | String | 核心算法,例如:SHA-256 |
| consensus | String | 共识算法,例如:PoW |
| diffEstimation | String | 下次挖矿难度预测,BTC 的单位:T |
| currentDiff | String | 当前全网挖矿难度 |
| diffAdjustTime | String | 下次挖矿难度调整时间 |
| circulatingSupply | String | 流通量 |
| totalSupply | String | 最大供应量 |
| tps | String | 链上每秒交易处理数量,近一周平均值 |
| lastHeight | String | 最新区块高度 |
| lastBlockTime | String | 上一个区块时间;Unix 时间戳的毫秒数格式,如 1597026383085 |
| issueDate | String | 发行日期;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"
}
]
}
