statistic by dex protocol

Returns DEX trades on Ethereum, where DEX protocol name is uniswap_v2, block date since 2024-01-04 and block date till 2024-01-10, sorted by block date: chain ID, block date, count, sum of fee sender fee, sum of fee burnt and sum of fee miner reward.

By Nadia · saved 10 January 2024 · run 2 times · Bitquery API v2

What it returns

Filters

The query

query ($network: evm_network, $from: String, $till: String, $protocol: String!) {
  EVM(dataset: archive, network: $network) {
    DEXTrades(
      where: {Trade: {Dex: {ProtocolName: {is: $protocol}}}, Block: {Date: {since: $from, till: $till}}}
      orderBy: {ascending: Block_Date}
    ) {
      ChainId
      Block {
        Date
      }
      count
      seller: count(distinct: Trade_Sell_Buyer)
      currency_sell: count(distinct: Trade_Sell_Currency_Symbol)
      buyer: count(distinct: Trade_Buy_Buyer)
      currency_buy: count(distinct: Trade_Buy_Currency_Symbol)
      to: count(distinct: Call_To)
      sender_fee: sum(of: Fee_SenderFee)
      burnt: sum(of: Fee_Burnt)
      reward: sum(of: Fee_MinerReward)
    }
  }
}

Variables

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

Similar queries