我将通过 Spring boot 使用 Uniswap v3 GraphQL API 获取代币价格。
所以我尝试在 Postman 中使用 URL 进行测试:https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v3 并查询:
{
factories(first: 5) {
id
poolCount
txCount
totalVolumeUSD
}
bundles(first: 5) {
id
ethPriceUSD
}
}
Run Code Online (Sandbox Code Playgroud)
但我无法像 thegraph.com 那样得到结果。
请帮助我了解如何使用 Uniswap v3 GraphQL API 获取代币价格。