查询交易列表#

获取 TradeZone 的交易列表,可按区块哈希、交易哈希或区块高度进行过滤。

请求路径#

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

请求参数#

参数名类型是否必须描述
chainShortNameString公链缩写符号,例如 TRADE_ZONE
blockHashString按区块哈希过滤
heightInteger按区块高度过滤
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/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": ""
                }
            ]
        }
    ]
}