查询地址交易列表#
获取 TradeZone 单个地址的交易列表,可按协议类型、代币合约、区块范围和交易方向进行过滤。
请求路径#
GET
https://web3.okx.com/api/v5/xlayer/tz/address/transaction-list请求参数#
| 参数名 | 类型 | 是否必须 | 描述 |
|---|---|---|---|
| chainShortName | String | 是 | 公链缩写符号,例如 TRADE_ZONE |
| address | String | 是 | 需要查询的地址 |
| startBlockHeight | Long | 否 | 起始区块高度(含) |
| endBlockHeight | Long | 否 | 结束区块高度(含) |
| 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/address/transaction-list?chainShortName=TRADE_ZONE&address=0x7ad674c0595de0885f7335b8dcaa91ca5d1723e5&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": "9341",
"total": "9341",
"data": [
{
"hash": "0x11d02c8e2b830265507b0dfc467900f30c1e729359e660a84bcc2f3b1e1b8f34",
"blockHeight": "21321328",
"blockHash": "0x61b22ea3b0a64ff0a9110daaca7dca77e6ba8e2324057ddbc929a3ddf55d226e",
"blockTime": "1779167134517",
"status": "0x1",
"from": "0x7ad674c0595de0885f7335b8dcaa91ca5d1723e5",
"actionType": "updateOwner",
"index": "3",
"value": "",
"valueRaw": ""
}
]
}
]
}
