Batch Get Transactions#
Batch query the detail of multiple TradeZone transactions. A maximum of 20 transaction hashes can be queried in a single request.
Request Path#
GET
https://web3.okx.com/api/v5/xlayer/tz/transaction/transaction-multiRequest Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
| chainShortName | String | Yes | The abbreviated name of the blockchain network, e.g, TRADE_ZONE |
| txId | String | Yes | Comma-separated list of transaction hashes. Maximum 20 per request. |
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 |
| nonce | String | Transaction nonce |
| actionType | String | Action type |
| actionData | String | Full Action JSON string |
| errorMessage | String | Error message when the transaction failed |
| index | String | Execution order |
| value | String | Transaction amount (token precision applied) |
| valueRaw | String | Transaction amount (raw integer, smallest unit) |
| tokenTransferCount | String | Number of token transfers emitted |
| eventCount | String | Number of events emitted |
Request Example#
shell
curl --location --request GET 'https://web3.okx.com/api/v5/xlayer/tz/transaction/transaction-multi?chainShortName=TRADE_ZONE&txId=0x1fb6e49ecd777ced8a8a4d0e343b7bf3052479302cefdcd32f400431e2780efa,0x3f0519739cbbc1583e1c10c4028300176a82ec910f7a72e31b1a59c2236565e9' \
--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": "0x1fb6e49ecd777ced8a8a4d0e343b7bf3052479302cefdcd32f400431e2780efa",
"blockHeight": "21265002",
"blockHash": "0xc88a39814bb554c69912348c7f327ff8f2fe3f5d48d61e14a03937e2bc9e3b3a",
"blockTime": "1779161501917",
"status": "0x1",
"from": "0x9dce198689d85d685731437866a7b06ff911d908",
"nonce": "1779161496872",
"actionType": "initPredictionMarket",
"actionData": "{\"type\":\"initPredictionMarket\",\"adapter\":\"0x726a2ae535223494eafd8189199645c5f369ffe0\",\"originalMarketId\":\"0xbea1323587e4c4bf89aa077056005e7af51dc62ee83bbfdfb4fe6003fde3fb09\",\"collateralToken\":\"0xf593d6073a1028ac457d02b202251f0e71fffc75\",\"tokenDecimal\":\"2\",\"wrapCollateralToken\":\"0xdb2bb6c3ee668da5b10fe02e30bcdea61c686942\",\"outcomeTokenFlag\":\"3\",\"makerFeeRate\":\"0\",\"takerFeeRate\":\"0\"}",
"errorMessage": "",
"index": "0",
"value": "",
"valueRaw": "",
"tokenTransferCount": "0",
"eventCount": "5"
},
{
"hash": "0x3f0519739cbbc1583e1c10c4028300176a82ec910f7a72e31b1a59c2236565e9",
"blockHeight": "21326728",
"blockHash": "0xe7ecaea8cbbe2d54ec29db5068f50ce21829aeee09cac0ce2e51d42ead34908e",
"blockTime": "1779167674517",
"status": "0x1",
"from": "0x7ad674c0595de0885f7335b8dcaa91ca5d1723e5",
"nonce": "1779167674454",
"actionType": "updateOwner",
"actionData": "{\"type\":\"updateOwner\",\"operationType\":\"add\",\"userAddress\":\"0xf24849984478d9733bc6e6ab3b0a0f0efd59aec8\",\"pubkeyhash\":\"0xd2bacbd6c222477d0162547d11ad8e3767a7575bdfbf123a1684f111d622e0f5\",\"source\":{\"blockNumber\":\"60398638\",\"txIndex\":\"1\",\"eventType\":\"UpdateOwner\",\"eventIndex\":\"14\",\"txHash\":\"0x48e8beaff460648a3cf82fa59c74d9dded39000f40510088642a205844fa4723\",\"eventNonce\":\"7850\"}}",
"errorMessage": "",
"index": "3",
"value": "",
"valueRaw": "",
"tokenTransferCount": "0",
"eventCount": "1"
}
]
}
