查询区块列表#
获取 TradeZone 的区块列表,可按区块高度进行过滤。
请求路径#
GET
https://web3.okx.com/api/v5/xlayer/tz/block/block-list请求参数#
| 参数名 | 类型 | 是否必须 | 描述 |
|---|---|---|---|
| chainShortName | String | 是 | 公链缩写符号,例如 TRADE_ZONE |
| height | String | 否 | 用于过滤的区块高度 |
| limit | Integer | 否 | 每次请求返回的结果数量,最大值为 100,默认值为 20 |
| page | Integer | 否 | 页码,默认值为 1 |
响应参数#
| 参数名 | 类型 | 描述 |
|---|---|---|
| page | String | 当前页码 |
| limit | String | 每页返回的结果数 |
| totalPage | String | 总页数 |
| total | String | 总记录数 |
| data | Array | 区块列表 |
| > hash | String | 区块哈希 |
| > height | String | 区块高度 |
| > miner | String | 出块者地址 |
| > blockTime | String | 区块时间(毫秒) |
| > transactionCount | String | 区块内交易数量 |
请求示例#
shell
curl --location --request GET 'https://web3.okx.com/api/v5/xlayer/tz/block/block-list?chainShortName=TRADE_ZONE&limit=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'
响应示例#
json
{
"code": "0",
"msg": "",
"data": [
{
"page": "1",
"limit": "1",
"totalPage": "13107437",
"total": "13107437",
"data": [
{
"hash": "0x0aa0d3d8e43f9b75260eaac71e73091377c5c2142d93e47433428900071955b2",
"height": "21324075",
"miner": "0x4d3b3c2eea46467131ecdf6bd4a8787612651408",
"blockTime": "1779167409217",
"transactionCount": "0"
}
]
}
]
}
