Here is the way to get the token price of all tokens in one query.
In this query, I am saying “Give me the latest data for all base currency where quote current is USDT and limit results by per base currency”
{
ethereum(network: ethereum) {
list1: dexTrades(
options: {limitBy: {each: "baseCurrency.address", limit: 1}, desc: ["block.timestamp.time", "tradeIndex"]}
exchangeName: {is: "Uniswap"}
quoteCurrency: {in: ["0xdac17f958d2ee523a2206206994597c13d831ec7"]}
time: {since: "2021-06-01T00:00:00"}
) {
baseCurrency {
address
symbol
}
block {
height
timestamp {
time(format: "%Y-%m-%d %H:%M:%S")
}
}
tradeIndex
trades: count
tradeAmount(in: USD)
quoteAmount
quotePrice
quoteCurrency {
address
symbol
}
}
}
}