批量查询区块交易列表#

批量查询 TradeZone 多个区块范围内的交易。区块范围(endBlockHeight - startBlockHeight)不能超过 10000

请求路径#

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

请求参数#

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

响应参数#

参数名类型描述
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/block/transaction-list-multi?chainShortName=TRADE_ZONE&startBlockHeight=21225378&endBlockHeight=21225378&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": [
        {
            "hash": "0x9820e1ab0c60b13c2decc923728d79c814cad59f61a401cf69402e20e8390988",
            "blockHeight": "21225378",
            "blockHash": "0x416bcebf9f71ae4d583f7a02bc3a4761be282977778705e9fa68e4cd0b7c7df8",
            "blockTime": "1779157539517",
            "status": "0x1",
            "from": "0x4febcb57fd90a8cbadb57f162118822e0f7165c6",
            "actionType": "predictionSplit",
            "index": "0",
            "value": "",
            "valueRaw": ""
        }
    ]
}