im trying to calculate the monthly Trade Volume (USDT) and Gas Fees (in BNB) of a set of contract addresses ( ~10 addresses) for the last two months of October and November 2021
im new to graphql and not sure how to query - im thinking something like the query below (using 2 eg addresses) , but there are some things i am unsure about:
- do i put the contract addresses into “TxSender”, “TxTo” , or both? where do i specify all the ~10 contract addresses ?
- how do I aggregate (think GROUP BY in SQL terms) the Gas Fees and Trade Volume at the month level ?
thank you!
query ($network: EthereumNetwork!, $dateFormat: String!, $from: ISO8601DateTime, $till: ISO8601DateTime) {
ethereum(network: $network) {
transactions(options: {asc: "date.date"}, date: {since: $from, till: $till}) {
date: date {
date(format: $dateFormat)
}
txs: count
dau: count(uniq: senders)
gasValue(
txSender: {in: ["0x491E59c255C790D4e3a53CEC2632524088f1aaA4", "0xd09649117110AA7a02dd5fB670219F385c43f88a"]}
)
}
}
}