查询地址交易列表#

获取 TradeZone 单个地址的交易列表,可按协议类型、代币合约、区块范围和交易方向进行过滤。

请求路径#

GET
https://web3.okx.com/api/v5/xlayer/tz/address/transaction-list

请求参数#

参数名类型是否必须描述
chainShortNameString公链缩写符号,例如 TRADE_ZONE
addressString需要查询的地址
startBlockHeightLong起始区块高度(含)
endBlockHeightLong结束区块高度(含)
limitInteger每次请求返回的结果数量,最大值为 100,默认值为 20
pageInteger页码,默认值为 1

响应参数#

参数名类型描述
pageString当前页码
limitString每页返回的结果数
totalPageString总页数
totalString总记录数
dataArray交易列表
> hashString交易哈希
> blockHeightString区块高度
> blockHashString区块哈希
> blockTimeString区块时间(毫秒)
> statusString交易状态:0x1 成功 / 0x0 失败
> fromString业务执行用户地址
> actionTypeStringAction 类型
> indexString执行顺序
> valueString交易金额(按代币精度处理)
> valueRawString交易金额(最小单位整数)

请求示例#

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