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-listRequest Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
| chainShortName | String | Yes | The abbreviated name of the blockchain network, e.g, XLAYER. |
| protocolType | String | No | Contract protocol type token_20 token_721 token_1155 token_10 Default is token_20 |
| tokenContractAddress | String | No | Token contract address |
| startTime | String | No | Retrieve 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. |
| endTime | String | No | Retrieve 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. |
| orderBy | String | No | Return 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. |
| page | String | No | Page |
| limit | String | No | The number of results returned per request. The maximum is 50. The default is 20. |
Response Parameters#
| Parameter | Type | Description |
|---|---|---|
| page | String | Current page number |
| limit | String | The amount of data |
| totalPage | String | Total number of pages |
| chainFullName | String | The full name of the blockchain network, e.g. X Layer |
| chainShortName | String | The abbreviated name of the blockchain network, e.g. XLAYER |
| tokenList | Array | Token list |
| > tokenFullName | String | Full name of the token |
| > token | String | Token name |
| > precision | String | Precision |
| > tokenContractAddress | String | Token contract address |
| > protocolType | String | Protocol type |
| > addressCount | String | Address count |
| > totalSupply | String | Total supply |
| > circulatingSupply | String | The total circulating supply of this token on all chains |
| > price | String | Price, the unit is USD |
| > website | String | Website |
| > totalMarketCap | String | The total market cap of this token on all chains |
| > issueDate | String | Issue Date |
| > transactionAmount24h | String | Transaction amount in the past 24 hours, the unit is USD, only for ERC-20 token |
| > tvl | String | Total value locked |
| > logoUrl | String | Logo 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"
}
]
}
]
}
