Vývojářský portál
Motiv

Get Token Transactions By Hash#

Query for token transfer detail by transaction hash.

Request Path#

GET
https://web3.okx200.com/api/v5/xlayer/transaction/token-transaction-detail

Request Parameters#

ParameterTypeRequiredDescription
chainShortNameStringYesThe abbreviated name of the blockchain network, e.g. XLAYER
txIdStringYesTransaction hash
protocolTypeStringNoContract protocol Type
pageStringNoPage
limitStringNoThe number of results returned per request

Response Parameters#

ParameterTypeDescription
pageStringCurrent page number
limitStringThe amount of data
totalPageStringTotal number of pages
tokenTransferDetailsArrayToken transfer detail
> txIdStringTransaction hash
> heightStringBlock height
> transactionTimeStringTransaction time
> fromStringSender address
> toStringRecipient address
> isFromContractBolIs the From address a contract address
> isToContractBolIs the To address a contract address
> tokenContractAddressStringContract address of the token
> amountStringTransaction amount
> symbolStringToken symbol

Request Example#

shell
curl --location --request GET 'https://web3.okx200.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"
                }
            ]
        }
    ]
}