Hackathon Query BSC: Weekly Txs, Senders, GasCost

A simple query for the 27th Nov hackathon

Returns the latest transactions on Ethereum and BNB Chain: start of interval, gas value, gas price and count.

By gaurav · saved 20 November 2020 · Bitquery API v1

What it returns

The query

query {
  ethereum(network: bsc) {
    transactions(options: {desc: "date.date"}) {
      date {
        date:startOfInterval(unit: week, offset: 4)
      }
      totalGasUsed: gasValue
      totalGasUsedInUSD: gasValue (in: USD)
      gasValueAvgPerTx: gasValue(calculate: average)
      gasValueAvgPerTxInUSD: gasValue(calculate: average in:USD)
      gasPrice
      avgGasPrice: gasPrice(calculate: average)
      medGasPrice: gasPrice(calculate: median)
      maxGasPrice: gasPrice(calculate: maximum)
      Txs: count 
      Senders: count(uniq: senders)
    }
  }
}

Variables

]

Similar queries