Batch Get Block Transactions#
Batch query transactions across a range of TradeZone blocks. The block range (endBlockHeight - startBlockHeight) cannot exceed 10000.
Request Path#
GET
https://web3.okx.com/api/v5/xlayer/tz/block/transaction-list-multiRequest Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
| chainShortName | String | Yes | The abbreviated name of the blockchain network, e.g, TRADE_ZONE |
| startBlockHeight | Long | Yes | The starting block height (inclusive) |
| endBlockHeight | Long | Yes | The end block height (inclusive). |
| limit | Integer | No | The number of results returned per request. The maximum is 100. The default is 20. |
| page | Integer | No | Page number, default 1 |
Response Parameters#
| Parameter | Type | Description |
|---|---|---|
| hash | String | Transaction hash |
| blockHeight | String | Block height |
| blockHash | String | Block hash |
| blockTime | String | Block time (ms) |
| status | String | Transaction status: 0x1 success / 0x0 failure |
| from | String | Business executing user address |
| actionType | String | Action type |
| index | String | Execution order |
| value | String | Transaction amount (token precision applied) |
| valueRaw | String | Transaction amount (raw integer, smallest unit) |
Request Example#
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'
Response Example#
json
{
"code": "0",
"msg": "",
"data": [
{
"hash": "0x9820e1ab0c60b13c2decc923728d79c814cad59f61a401cf69402e20e8390988",
"blockHeight": "21225378",
"blockHash": "0x416bcebf9f71ae4d583f7a02bc3a4761be282977778705e9fa68e4cd0b7c7df8",
"blockTime": "1779157539517",
"status": "0x1",
"from": "0x4febcb57fd90a8cbadb57f162118822e0f7165c6",
"actionType": "predictionSplit",
"index": "0",
"value": "",
"valueRaw": ""
}
]
}
