Check out this ShareGPT conversation

您所在的位置:网站首页 priceusd Check out this ShareGPT conversation

Check out this ShareGPT conversation

#Check out this ShareGPT conversation| 来源: 网络整理| 查看: 265

I apologize for the confusion. The liquidity field is not available in the Uniswap V3 subgraph either. Here's an updated query that should return the token symbol, current price, price change, and TVL (in USD):

lessCopy code{ tokens(first: 10, orderBy: tradeVolumeUSD, orderDirection: desc) { id symbol derivedETH totalValueLockedUSD tradeVolumeUSD volumeUSD tokenDayDatas(first: 2, orderBy: date, orderDirection: desc) { priceUSD } } }

In this query, we're querying for the top 10 tokens on the Uniswap V3 network, sorted by tradeVolumeUSD in descending order. We're also returning the token id, symbol, derivedETH (the token's price in ETH), totalValueLockedUSD (the TVL of the token, denominated in USD), tradeVolumeUSD (the 24h trading volume of the token, denominated in USD), and volumeUSD (the 24h volume of the token, denominated in USD).

We're using a subquery to retrieve the current priceUSD of each token. This is done by querying the tokenDayDatas field for the most recent two days and returning the priceUSD for the most recent day.

Please note that the Uniswap V3 subgraph is maintained by a third-party developer and may be subject to changes or updates. The query may need to be adjusted over time to reflect changes in the subgraph schema.



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3