Портал розробників
Тема

Get Token Transfer Details#

Get details of a specified token transfer from a specified chain.

Request Path#

GET
https://web3.okx.com/api/v5/xlayer/token/transaction-list

Request Parameters#

ParameterTypeRequiredDescription
chainShortNameStringYesThe abbreviated name of the blockchain network, e.g, XLAYER.
tokenContractAddressStringYesToken contract address
maxAmountStringNoTransaction quantity range, maximum amount
minAmountStringNoTransaction quantity range, minimum amount
pageStringNoPage
limitStringNoThe number of results returned per request. The maximum is 50. The default is 20.

Response Parameters#

ParameterTypeDescription
pageStringCurrent page number
limitStringThe amount of data
totalPageStringTotal number of pages
chainFullNameStringThe full name of the blockchain network, e.g. X Layer
chainShortNameStringThe abbreviated name of the blockchain network, e.g. XLAYER
totalTransferStringTotal transfer
transactionListArrayTransaction List
> txidStringTransaction hash
> blockHashStringBlock hash
> heightStringBlock height
> transactionTimeStringThe Unix timestamp of the transaction time, in milliseconds format, e.g., 1597026383085
> toStringToken arrival address
> fromStringToken transfer out address
> isFromContractBolIs the transfer out token address a contract address
> isToContractBolIs the receiving token address a contract address
> amountStringTransaction amount
> transactionSymbolStringToken symbol of the transaction
> methodIdStringMethod ID
> tokenContractAddressStringToken Contract Address
> protocolTypeStringProtocol Type
> stateStringStatus success fail``pending
> tokenIdStringNFT token ID for 721 and 1155 tokens

Request Example#

shell
curl --location --request GET 'https://web3.okx.com/api/v5/xlayer/token/transaction-list?chainShortName=xlayer&tokenContractAddress=0x1e4a5963abfd975d8c9021ce480b42188849d41d&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": "10000",
            "chainFullName": "X Layer",
            "chainShortName": "XLAYER",
            "totalTransfer": "1332602",
            "transactionList": [
                {
                    "txid": "0xfb049c749434287e1064cbfccc800d2c35b35b1b2659b4686a3bc6ad6efd663b",
                    "blockHash": "0xab788f2c037770b00ee5eade14257caa85aa92f2c7b0212329cc0e76661b1d89",
                    "height": "31129117",
                    "transactionTime": "1755489752000",
                    "from": "0xee796e9e58ae7b248ee34b752835b4eda11ec8a5",
                    "to": "0xc71f9e1de80eb505c0cb3bbf90ae6593130e5d25",
                    "isToContract": true,
                    "amount": "500",
                    "transactionSymbol": "USDT",
                    "methodId": "0x751962f6",
                    "tokenContractAddress": "0x1e4a5963abfd975d8c9021ce480b42188849d41d",
                    "protocolType": "ERC20",
                    "state": "success",
                    "tokenId": ""
                }
            ]
        }
    ]
}