Volumn and count per hour, minute or days or week

I am showing how to use time interval to get metrics based on second, mint, hourly, weekly or monthly.

{
  ethereum(network: bsc) {
    dexTrades(
      date: {since: "2022-04-06"}
      exchangeAddress: {is: "0xca143ce32fe78f1f7019d7d551a6402fc5350c73"}
      baseCurrency: {is: "0xe9e7cea3dedca5984780bafc599bd69add087d56"}
      quoteCurrency: {is: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"}
    ) {
      count
      tradeAmount(in: USD)
      timeInterval{
        hour (count: 4)
      }
    }
  }
}

You change “hour” to in anything in following

Screenshot 2022-04-08 at 9.16.43 PM

1 Like