查询代币列表#

获取链上指定代币的基本信息,支持筛选代币的发行时间,可查询最新发行的代币,代币发行时间的筛选跨度最长为1年。

请求路径#

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

请求参数#

参数名类型是否必须描述
chainShortNameString公链缩写符号,例如 XLAYER
protocolTypeString合约协议类型 20代币:token_20 721代币:token_721 1155代币:token_1155 10代币:token_10 默认是token_20
tokenContractAddressString代币合约地址
startTimeString查询发行时间晚于该时间的代币,Unix时间戳的毫秒数格式,如 1597026383085;startTime与endTime之差最长不超过1年
endTimeString查询发行时间早于该时间的代币,Unix时间戳的毫秒数格式,如 1597026383085;startTime与endTime之差最长不超过1年
orderByString按照不同指标降序返回,仅针对20代币 totalMarketCap:按代币总市值从高到低返回 transactionAmount24h :按代币24h交易金额从高到低返回 默认按市值从高到低返回
pageString页码
limitString返回条数,默认返回最近的20条,最多50条

响应参数#

参数名类型描述
pageString当前页码
limitString当前页共多少条数据
totalPageString总共多少页
chainFullNameString公链全称,例如:X Layer
chainShortNameString公链缩写符号,例如:XLAYER
tokenListArray代币列表
> tokenFullNameString代币名字全称:USDCoin
> tokenString代币名字简称:USDC
> precisionString精度
> tokenContractAddressString代币合约地址
> protocolTypeString代币合约协议类型
> addressCountString持币地址数
> totalSupplyString最大供应量
> circulatingSupplyString该代币在所有链上的总流通量
> priceString价格,USD为单位
> websiteString官方网站
> totalMarketCapString该代币在所有链上的总市值
> issueDateString代币发行日期
> transactionAmount24hString代币24h交易金额,单位为美元,仅支持20代币
> tvlString代币的总锁仓市值
> logoUrlString代币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"
                }
            ]
        }
    ]
}