查询区块详情#
根据区块高度获取 TradeZone 单个区块的详情。
请求路径#
GET
https://web3.okx.com/api/v5/xlayer/tz/block/block-fills请求参数#
| 参数名 | 类型 | 是否必须 | 描述 |
|---|---|---|---|
| chainShortName | String | 是 | 公链缩写符号,例如 TRADE_ZONE |
| height | String | 是 | 需要查询的区块高度 |
响应参数#
| 参数名 | 类型 | 描述 |
|---|---|---|
| hash | String | 区块哈希 |
| height | String | 区块高度 |
| previousBlockHash | String | 前置区块哈希 |
| miner | String | 出块者地址 |
| blockTime | String | 区块时间(毫秒) |
| size | String | 区块大小(字节) |
| transactionCount | String | 区块内交易数量 |
| tokenTransferCount | String | 区块内代币转账总数 |
| eventCount | String | 区块内事件总数 |
| transactionsRoot | String | 交易树根 |
请求示例#
shell
curl --location --request GET 'https://web3.okx.com/api/v5/xlayer/tz/block/block-fills?chainShortName=TRADE_ZONE&height=21217618' \
--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": [
{
"hash": "0xdf8ad76a3fac0a8af9d8496bc68319a53dafe1e9c4965e0b34d0364c561f2cbd",
"height": "21217618",
"previousBlockHash": "0xe2f1e913924d73fbc1f7544e48ec469cbf0e3698b4c8e16d0ac297dcfbb83f43",
"miner": "0x4d3b3c2eea46467131ecdf6bd4a8787612651408",
"blockTime": "1779156763517",
"size": "1814",
"transactionCount": "4",
"tokenTransferCount": "0",
"eventCount": "4",
"transactionsRoot": "0xf73bdc0c5fe8d927ffe205907b902e6ed15a49d3496e16fb75f85ba00ab4e4c5"
}
]
}
