查询交易列表#
获取 TradeZone 的交易列表,可按区块哈希、交易哈希或区块高度进行过滤。
请求路径#
GET
https://web3.okx.com/api/v5/xlayer/tz/transaction/transaction-list请求参数#
| 参数名 | 类型 | 是否必须 | 描述 |
|---|---|---|---|
| chainShortName | String | 是 | 公链缩写符号,例如 TRADE_ZONE |
| blockHash | String | 否 | 按区块哈希过滤 |
| height | Integer | 否 | 按区块高度过滤 |
| limit | Integer | 否 | 每次请求返回的结果数量,最大值为 100,默认值为 20 |
| page | Integer | 否 | 页码,默认值为 1 |
响应参数#
| 参数名 | 类型 | 描述 |
|---|---|---|
| page | String | 当前页码 |
| limit | String | 每页返回的结果数 |
| totalPage | String | 总页数 |
| total | String | 总记录数 |
| data | Array | 交易列表 |
| > hash | String | 交易哈希 |
| > blockHeight | String | 区块高度 |
| > blockHash | String | 区块哈希 |
| > blockTime | String | 区块时间(毫秒) |
| > status | String | 交易状态:0x1 成功 / 0x0 失败 |
| > from | String | 业务执行用户地址 |
| > actionType | String | Action 类型 |
| > index | String | 执行顺序 |
| > value | String | 交易金额(按代币精度处理) |
| > valueRaw | String | 交易金额(最小单位整数) |
请求示例#
shell
curl --location --request GET 'https://web3.okx.com/api/v5/xlayer/tz/transaction/transaction-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": "4479103",
"total": "4479103",
"data": [
{
"hash": "0x3f0519739cbbc1583e1c10c4028300176a82ec910f7a72e31b1a59c2236565e9",
"blockHeight": "21326728",
"blockHash": "0xe7ecaea8cbbe2d54ec29db5068f50ce21829aeee09cac0ce2e51d42ead34908e",
"blockTime": "1779167674517",
"status": "0x1",
"from": "0x7ad674c0595de0885f7335b8dcaa91ca5d1723e5",
"actionType": "updateOwner",
"index": "3",
"value": "",
"valueRaw": ""
}
]
}
]
}
