查询区块详情#

根据区块高度获取 TradeZone 单个区块的详情。

请求路径#

GET
https://web3.okx.com/api/v5/xlayer/tz/block/block-fills

请求参数#

参数名类型是否必须描述
chainShortNameString公链缩写符号,例如 TRADE_ZONE
heightString需要查询的区块高度

响应参数#

参数名类型描述
hashString区块哈希
heightString区块高度
previousBlockHashString前置区块哈希
minerString出块者地址
blockTimeString区块时间(毫秒)
sizeString区块大小(字节)
transactionCountString区块内交易数量
tokenTransferCountString区块内代币转账总数
eventCountString区块内事件总数
transactionsRootString交易树根

请求示例#

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