Trade Volume Trend by protocol

Returns DEX trades on Ethereum, where DEX protocol name is uniswap_v2, block date since 2024-01-03 and block date till 2024-01-10, sorted by block date: block date, sum of trade buy amount in USD and sum of trade sell amount in USD.

By Nadia · saved 17 February 2025 · run 1 time · Bitquery API v2

What it returns

Filters

The query

query ($network: evm_network, $protocol: String, $from: String, $till: String) {
  EVM(dataset: combined, network: $network) {
    DEXTrades(
      where: {
        Block: {Date: {since: $from, till: $till}},
        Trade: {Dex: {ProtocolName: {is: $protocol}}, Success: true}
      }
      orderBy: {ascending: Block_Date}
    ) {
      Block {
        Date
      }
      buy_amount_usd: sum(of: Trade_Buy_AmountInUSD)
      sell_amount_usd: sum(of: Trade_Sell_AmountInUSD)
    }
  }
}

Variables

{
  "network": "eth",
  "limit": 10,
  "offset": 0,
  "from": "2024-01-03",
  "till": "2024-01-10",
  "protocol": "uniswap_v2"
}

Similar queries