查询代币列表#
获取链上指定代币的基本信息,支持筛选代币的发行时间,可查询最新发行的代币,代币发行时间的筛选跨度最长为1年。
请求路径#
GET
https://web3.okx.com/api/v5/xlayer/token/token-list请求参数#
| 参数名 | 类型 | 是否必须 | 描述 |
|---|---|---|---|
| chainShortName | String | 是 | 公链缩写符号,例如 XLAYER |
| protocolType | String | 否 | 合约协议类型 20代币:token_20 721代币:token_721 1155代币:token_1155 10代币:token_10 默认是token_20 |
| tokenContractAddress | String | 否 | 代币合约地址 |
| startTime | String | 否 | 查询发行时间晚于该时间的代币,Unix时间戳的毫秒数格式,如 1597026383085;startTime与endTime之差最长不超过1年 |
| endTime | String | 否 | 查询发行时间早于该时间的代币,Unix时间戳的毫秒数格式,如 1597026383085;startTime与endTime之差最长不超过1年 |
| orderBy | String | 否 | 按照不同指标降序返回,仅针对20代币 totalMarketCap:按代币总市值从高到低返回 transactionAmount24h :按代币24h交易金额从高到低返回 默认按市值从高到低返回 |
| page | String | 否 | 页码 |
| limit | String | 否 | 返回条数,默认返回最近的20条,最多50条 |
响应参数#
| 参数名 | 类型 | 描述 |
|---|---|---|
| page | String | 当前页码 |
| limit | String | 当前页共多少条数据 |
| totalPage | String | 总共多少页 |
| chainFullName | String | 公链全称,例如:X Layer |
| chainShortName | String | 公链缩写符号,例如:XLAYER |
| tokenList | Array | 代币列表 |
| > tokenFullName | String | 代币名字全称:USDCoin |
| > token | String | 代币名字简称:USDC |
| > precision | String | 精度 |
| > tokenContractAddress | String | 代币合约地址 |
| > protocolType | String | 代币合约协议类型 |
| > addressCount | String | 持币地址数 |
| > totalSupply | String | 最大供应量 |
| > circulatingSupply | String | 该代币在所有链上的总流通量 |
| > price | String | 价格,USD为单位 |
| > website | String | 官方网站 |
| > totalMarketCap | String | 该代币在所有链上的总市值 |
| > issueDate | String | 代币发行日期 |
| > transactionAmount24h | String | 代币24h交易金额,单位为美元,仅支持20代币 |
| > tvl | String | 代币的总锁仓市值 |
| > logoUrl | String | 代币logo的url |
请求示例#
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'
响应示例#
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"
}
]
}
]
}
