Batch Get Token Transactions By Hash#
This allows for querying token transactions of up to 20 transaction at once.
Request Path#
GET
https://web3.okx200.com/api/v5/xlayer/transaction/token-transfer-multiRequest Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
| chainShortName | String | Yes | The abbreviated name of the blockchain network, e.g. XLAYER |
| txId | String | Yes | Transaction hash, multiple transactions separated by , Maximum 20 txIds |
| protocolType | String | No | Contract protocol Type |
| page | String | No | Page |
| limit | String | No | The number of results returned per request |
Response Parameters#
| Parameter | Type | Description |
|---|---|---|
| page | String | Current page number |
| limit | String | The amount of data |
| totalPage | String | Total number of pages |
| tokenTransferDetails | Array | Token transfer detail |
| > txId | String | Transaction hash |
| > blockHash | String | Block hash of the transaction |
| > height | String | Block height |
| > transactionTime | String | Transaction time |
| > from | String | Sender address |
| > to | String | Recipient address |
| > isFromContract | Bol | Is the From address a contract address |
| > isToContract | Bol | Is the To address a contract address |
| > tokenContractAddress | String | Contract address of the token. |
| > amount | String | Transaction amount |
| > tokenId | String | NFT token ID |
| > symbol | String | Token symbol |
Request Example#
shell
curl --location --request GET 'https://web3.okx200.com/api/v5/xlayer/transaction/token-transfer-multi?chainShortName=xlayer&txId=0x1af59bfbca54ad5ed218b22916c311ea32093a648f45f1ff2c01bc28c5554b6f&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": [
{
"page": "1",
"limit": "1",
"totalPage": "3",
"transactionList": [
{
"txId": "0x1af59bfbca54ad5ed218b22916c311ea32093a648f45f1ff2c01bc28c5554b6f",
"blockHash": "0xe4e63daf5828275b9ddf278220ceaae6e533d504201d7279702bb03e51df55b7",
"height": "31277273",
"transactionTime": "1755569805000",
"from": "0x7914c6170c4781db3989078d76c8f007151de673",
"to": "0xc71f9e1de80eb505c0cb3bbf90ae6593130e5d25",
"isFromContract": false,
"isToContract": true,
"amount": "300",
"tokenId": "",
"symbol": "USDT",
"tokenContractAddress": "0x1e4a5963abfd975d8c9021ce480b42188849d41d"
}
]
}
]
}
