Entwicklerportal
Anzeigemodus

Get Token List#

Get basic information about a token on a chain, you can filter tokens by their issue date to search for the latest issued tokens, and the maximum filtering time span is one year.

Request Path#

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

Request Parameters#

ParameterTypeRequiredDescription
chainShortNameStringYesThe abbreviated name of the blockchain network, e.g, XLAYER.
protocolTypeStringNoContract protocol type token_20 token_721 token_1155 token_10 Default is token_20
tokenContractAddressStringNoToken contract address
startTimeStringNoRetrieve tokens with issue dates later than this time. It should be in Unix timestamp format in milliseconds, e.g., 1597026383085. The time difference between startTime and endTime should not exceed one year.
endTimeStringNoRetrieve tokens with issue dates earlier than this time. It should be in Unix timestamp format in milliseconds, e.g., 1597026383085. The time difference between startTime and endTime should not exceed one year.
orderByStringNoReturn the results in descending order based on different criteria. Only applicable to 20 tokens. totalMarketCap: Sort by total market capitalization in descending order. transactionAmount24h: Sort by 24-hour transaction amount in descending order. By default, the results are sorted by market capitalization in descending order.
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
tokenListArrayToken list
> tokenFullNameStringFull name of the token
> tokenStringToken name
> precisionStringPrecision
> tokenContractAddressStringToken contract address
> protocolTypeStringProtocol type
> addressCountStringAddress count
> totalSupplyStringTotal supply
> circulatingSupplyStringThe total circulating supply of this token on all chains
> priceStringPrice, the unit is USD
> websiteStringWebsite
> totalMarketCapStringThe total market cap of this token on all chains
> issueDateStringIssue Date
> transactionAmount24hStringTransaction amount in the past 24 hours, the unit is USD, only for ERC-20 token
> tvlStringTotal value locked
> logoUrlStringLogo url of the token

Request Example#

shell
curl --location --request GET 'https://web3.okx.com/api/v5/xlayer/token/token-list?chainShortName=xlayer&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": "5708",
            "chainFullName": "X Layer",
            "chainShortName": "XLAYER",
            "tokenList": [
                {
                    "tokenFullName": "Tether USD",
                    "token": "USDT",
                    "precision": "6",
                    "tokenContractAddress": "0x1e4a5963abfd975d8c9021ce480b42188849d41d",
                    "protocolType": "ERC20",
                    "addressCount": "130358",
                    "totalSupply": "26555873.0171",
                    "circulatingSupply": "158626664755.6",
                    "price": "1.00061",
                    "website": "",
                    "totalMarketCap": "158644113688.72",
                    "issueDate": "1711855673000",
                    "transactionAmount24h": "8326653.482096258",
                    "tvl": "176084.18571530422",
                    "logoUrl": "https://static.oklink.com/cdn/web3/currency/token/pre/534352-0xf55bec9cafdbe8730f096aa55dad6d22d44099df-1.png/type=default_350_0?v=1735291372501"
                }
            ]
        }
    ]
}