buyer,seller, sells,buys, trades, volume

Returns DEX trades by token on Ethereum, where currency smart contract is 0x6982…1933 and DEX smart contract is 0xA43f…Ec9f: currency name, smart contract, currency symbol, protocol name, protocol family, side currency symbol, side currency name and 3 more fields.

By Akshat · saved 5 February 2026 · Bitquery API v2

What it returns

Filters

The query

query ($network: evm_network, $token: String, $pairAddress: String) {
  EVM(dataset: realtime, network: $network) {
    DEXTradeByTokens(
      where: {TransactionStatus: {Success: true}, Trade: {Currency: {SmartContract: {is: $token}}, Dex: {SmartContract: {is: $pairAddress}}}, Block: {Time: {since_relative: {hours_ago: 24}}}}
    ) {
      Trade {
        Currency {
          Name
          SmartContract
          Symbol
        }
        Dex {
          ProtocolName
          ProtocolFamily
          SmartContract
        }
        Side {
          Currency {
            Symbol
            Name
            SmartContract
          }
        }
      }
      unique_traders: count(distinct: Transaction_From)
      buyers: count(
        distinct: Transaction_From
        if: {Trade: {Side: {Type: {is: sell}}}}
      )
      sellers: count(
        distinct: Transaction_From
        if: {Trade: {Side: {Type: {is: buy}}}}
      )
      trades: count
      traded_volume: sum(of: Trade_Side_AmountInUSD)
      buy_volume: sum(
        of: Trade_Side_AmountInUSD
        if: {Trade: {Side: {Type: {is: sell}}}}
      )
      sell_volume: sum(
        of: Trade_Side_AmountInUSD
        if: {Trade: {Side: {Type: {is: buy}}}}
      )
      buys: count(if: {Trade: {Side: {Type: {is: sell}}}})
      sells: count(if: {Trade: {Side: {Type: {is: buy}}}})
    }
  }
}

Variables

{
  "network": "eth",
  "token": "0x6982508145454Ce325dDbE47a25d4ec3d2311933",
  "pairAddress": "0xA43fe16908251ee70EF74718545e4FE6C5cCEc9f"
}

Similar queries