query ($network: EthereumNetwork!, $from: ISO8601DateTime, $till: ISO8601DateTime) {
ethereum(network: $network) {
dexTrades(
date: {since: $from, till: $till}
options: {limitBy: {limit: 1, each: “smartContract.address.address”}, limit: 10, desc: “final”}
) {
smartContract {
address {
address
}
}
first_trade_quote_price: minimum(of: block, get: quote_price)
last_trade_quote_price: maximum(of: block, get: quote_price)
diff: expression(get: “last_trade_quote_price - first_trade_quote_price”)
div: expression(get: “diff / first_trade_quote_price”)
final: expression(get: “div*100”)
baseCurrency {
symbol
address
}
quoteCurrency {
symbol
address
}
protocol
}
}
}
how to change this to bsc chain
Set
ethereum(network: bsc)
Please read more about writing queries in docs : Overview | Blockchain Graphql API (V1 API Docs)