Currently to get the ohlc data im using this query:
{
ethereum(network: bsc) {
dexTrades(
options: {asc: "timeInterval.hour"}
date: {since: "2021-07-17"}
baseCurrency: {is: "0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c"}
quoteCurrency: {is: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"}
) {
timeInterval {
hour
}
baseCurrency{
symbol
address
}
high: quotePrice(calculate: maximum)
low: quotePrice(calculate: minimum)
open: minimum(of: block, get: quote_price)
close: maximum(of: block, get: quote_price)
}
}
}
It is functional, but how could i get the data in USD? so i know i would have to get the price of wbnb but how to get it in the same query?
And how can i get the largest lp pair of each token depending on the network?