How to get price token PAIR?

How can I get the token/non-usd price like poocoin? thank

{
ethereum(network: bsc) {
dexTrades(
options: {limit: 100, desc: “block.height”}
exchangeName: {in: [“Pancake”, “Pancake v2”]}
baseCurrency: {is: “0x2170ed0880ac9a755fd29b2688956bd959f933f8”}
quoteCurrency: {in: [“0xe9e7cea3dedca5984780bafc599bd69add087d56”, “0x55d398326f99059ff775485246999027b3197955”, “0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c”, “0x2170ed0880ac9a755fd29b2688956bd959f933f8”]}
time: {till: “2022-02-03T10:38:00+0700”}
) {
transaction {
hash
}
block {
height
}
buyCurrency {
symbol
address
}
sellCurrency {
symbol
address
}
buyAmount(calculate: maximum)
sellAmount(calculate: maximum)
any(of: time)
exchange {
name
}
tradeAmount(in: USD)
side
baseCurrency {
symbol
}
quoteCurrency {
symbol
}
quotePrice
}
}
}

If i use this 1 api price is only right on usd? Thanks

if there is XYZ/WBNB pair and you want usd value, then one simply can get WBNB/USDT value and based on that they can calculate XYZ/USDT. you can refer to this for further understanding
https://bitquery.io/blog/dex-price-index

1 Like

thanks. How can I calculate Biggest buyers, Biggest sellers like poocoin.

Please refer to the following query:

Top buyers & sellers in Binance DEX (bitquery.io)

Already answered in this community forum topic