crpytorank_volume_query_

Returns DEX trades on Arbitrum, where DEX protocol name is uniswap_v3, block time after 2024-12-19 and buy amount in USD is above 10: buy currency symbol, buy smart contract, sell currency symbol, sell smart contract, average of trade buy price, sum of trade buy amount and sum of trade sell amount.

By Omkar_BQ · saved 7 January 2025 · run 2 times · Bitquery API v2

What it returns

Filters

The query

query Pairs(
    $network: evm_network
    $exchangeName: String!
    $from: DateTime!
    $minTradeAmount: String!
    $fromPrice: DateTime!
  ) {
    EVM(network: $network) {
      DEXTrades(
        where: {
          Trade: {
            Dex: { ProtocolName: { is: $exchangeName } }
            Buy: { AmountInUSD: { gt: $minTradeAmount } }
          }
          Block: { Time: { after: $from } }
          TransactionStatus: { Success: true }
        }
      ) {
        Trade {
          Buy {
            Currency {
              Symbol
              SmartContract
            }
          }
          Sell {
            Currency {
              Symbol
              SmartContract
            }
          }
        }
        buyPrice: average(of: Trade_Buy_Price, if: { Block: { Time: { after: $fromPrice } } })
        buyAmount: sum(of: Trade_Buy_Amount)
        sellAmount: sum(of: Trade_Sell_Amount)
      }
    }
  }

Variables

{
    "exchangeName": "uniswap_v3",
    "network": "arbitrum",
    "from": "2024-12-19T08:55:16.114Z",
    "minTradeAmount": "10",
    "fromPrice": "2024-12-20T08:50:16.114Z"
  }

Similar queries