Get Basic Block Statistics#
Query basic block statistics for a specific chain, including latest block height, first block information, average block interval, and average block size.
Supported chains: see Get Chain Info API Supported Chains (apiName: block).
Request URL#
GET
https://web3.okx.com/api/v6/explorer/info/blockRequest Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
| chainIndex | String | Yes | Unique identifier of the chain, e.g., 1 for ETH, 0 for BTC. See Get Chain Info API Supported Chains for supported values. |
Response Parameters#
| Parameter | Type | Description |
|---|---|---|
| chainIndex | String | Unique identifier of the chain. |
| symbol | String | Native token of the chain. |
| lastHeight | String | Latest block height. |
| firstExchangeHistoricalTime | String | Time of the first transaction. Unix timestamp in milliseconds, e.g., 1597026383085. |
| firstBlockTime | String | Time of the first block. Unix timestamp in milliseconds, e.g., 1597026383085. |
| firstBlockHeight | String | Height of the first block. |
| avgBlockInterval | String | Average block interval (past week). |
| avgBlockSize24h | String | Average block size (24 hours). |
| avgBlockSize24hPercent | String | Change in average block size. |
| mediaBlockSize | String | Median block size (past week). |
| halveTime | String | Halving time. Unix timestamp in milliseconds, e.g., 1597026383085. |
Request Example#
shell
curl --location --request GET 'https://web3.okx.com/api/v6/explorer/info/block?chainIndex=1' \
--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": "1",
"symbol": "ETH",
"lastHeight": "22990123",
"firstExchangeHistoricalTime": "",
"firstBlockTime": "1438269973000",
"firstBlockHeight": "0",
"avgBlockInterval": "12.08",
"avgBlockSize24h": "78345",
"avgBlockSize24hPercent": "0.0123",
"mediaBlockSize": "72110",
"halveTime": ""
}
]
}
