volume and trades for a token in different time frames

Returns DEX trades by token on BNB Chain, where currency smart contract is 0x9b48…0d40: currency name, currency symbol, smart contract, sum of trade side amount in USD and count.

By Kshitij Mahajan · saved 2 September 2025 · run 6 times · Bitquery API v2

What it returns

Filters

The query

query MyQuery($currency: String) {
  EVM(network: bsc) {
    DEXTradeByTokens(
      where: {
        Trade: {
          Currency: {
            SmartContract: {is: $currency}
          },
          Success: true
        }, 
        Block: {
          Time: {since_relative: {hours_ago: 24}}
        }
      }
    ) {
      Trade {
        Currency {
          Name
          Symbol
          SmartContract
        }
      }
      volume_24hr: sum(of: Trade_Side_AmountInUSD)
      volume_1hr: sum(
        of: Trade_Side_AmountInUSD
        if: {Block: {Time: {since_relative: {hours_ago:1}}}}
      )
      volume_5min: sum(
        of: Trade_Side_AmountInUSD
        if: {Block: {Time: {since_relative:{minutes_ago:5}}}}
      )
      trades_24hr: count
      trades_1hr: count(if: {Block: {Time: {since_relative: {hours_ago:1}}}})
      trades_5min: count(if: {Block: {Time: {since_relative:{minutes_ago:5}}}})
    }
  }
}

Variables

{
  "currency": "0x9b48a54bcce09e59b0479060e9328ab7dbdb0d40"
}

Similar queries