DEXTrades overlapping problem

Returns DEX trades on Ethereum, where pair smart contract is 0xa43f…ec9f and block time since 2024-06-03: buy currency symbol, buy price, sell currency symbol, sell price, smart contract, pair name, sum of trade buy amount and sum of trade sell amount.

By Coinranking · saved 4 June 2024 · Bitquery API v2

What it returns

Filters

The query

query MyQuery {
  EVM(dataset: combined, network: eth) {
    DEXTrades(
      where: {
        Trade: {
          Dex: {
            Pair: {
              SmartContract: {
                in: [
                  # OMIKAMI / USDC
                  # "0x06cd6245156c3608ae67d690c125e86a8bc6a88c",
                  # WETH / USDC
                  # "0xa43fe16908251ee70ef74718545e4fe6c5ccec9f"
                  # RAD / USDC
                  # "0x8c1c499b1796d7f3c2521ac37186b52de024e58c"
                  # PEPE / WETH
                  "0xa43fe16908251ee70ef74718545e4fe6c5ccec9f"
                ]
              }
            }
            # ProtocolName: { is: "uniswap_v2" }
          }
        }
        Block: { Time: { since: "2024-06-03T10:51:31.046Z" } }
      }
    ) {
      Trade {
        Buy {
          Currency {
            Symbol
          }
          High: Price(maximum: Trade_Buy_Price)
          Low: Price(minimum: Trade_Buy_Price)
          Open: Price(minimum: Block_Number)
          Close: Price(maximum: Block_Number)
        }
        Sell {
          Currency {
            Symbol
          }
          High: Price(maximum: Trade_Sell_Price)
          Low: Price(minimum: Trade_Sell_Price)
          Open: Price(minimum: Block_Number)
          Close: Price(maximum: Block_Number)
        }
        Dex {
          Pair {
            SmartContract
            Name
          }
        }
      }
      volumeBuy: sum(of: Trade_Buy_Amount)
      volumeSell: sum(of: Trade_Sell_Amount)
    }
  }
}

Similar queries