Get Token Transactions By Hash#
Query for token transfer detail by transaction hash.
Request Path#
GET
https://web3.okx.com/api/v5/xlayer/transaction/token-transaction-detailRequest Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
| chainShortName | String | Yes | The abbreviated name of the blockchain network, e.g. XLAYER |
| txId | String | Yes | Transaction hash |
| 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 |
| > 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 |
| > symbol | String | Token symbol |
Request Example#
shell
curl --location --request GET 'https://web3.okx.com/api/v5/xlayer/transaction/token-transaction-detail?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",
"tokenTransferDetails": [
{
"txId": "0x1af59bfbca54ad5ed218b22916c311ea32093a648f45f1ff2c01bc28c5554b6f",
"from": "0x7914c6170c4781db3989078d76c8f007151de673",
"to": "0xc71f9e1de80eb505c0cb3bbf90ae6593130e5d25",
"height": "31277273",
"transactionTime": "1755569805000",
"isFromContract": false,
"isToContract": true,
"tokenContractAddress": "0x1e4a5963abfd975d8c9021ce480b42188849d41d",
"symbol": "USDT",
"amount": "300"
}
]
}
]
}
