interface conversion: interface {} is nil, not string

Returns DEX trades on Arbitrum, where DEX protocol name is uniswap_v3, block time after 2025-08-03 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 4 August 2025 · run 7 times · Bitquery API v2

What it returns

Filters

The query

query Pairs($network: evm_network, $exchangeName: String!, $ownerAddress: [String!], $from: DateTime!, $minTradeAmount: String!, $fromPrice: DateTime!) {
  EVM(network: $network, dataset: combined) {
    DEXTrades(
      where: {Trade: {Dex: {ProtocolName: {is: $exchangeName}, OwnerAddress: {in: $ownerAddress}}, 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",
  "from": "2025-08-03T06:58:07.544Z",
  "fromPrice": "2025-08-04T06:53:07.544Z",
  "minTradeAmount": "10",
  "network": "arbitrum"
}

Similar queries