MEV Bot Query Testcase

Returns DEX trades by token on Ethereum, where currency smart contract is 0xc02a…6cc2, block time since 2024-06-27 and block time till 2024-06-27: sum of trade amount in USD, sum of trade side amount in USD and count.

By dj · saved 27 June 2024 · Bitquery API v2

What it returns

Filters

The query

query MyQuery {
  EVM(dataset: realtime, network: eth) {
    DEXTradeByTokens(
      where: {Trade: {Currency: {SmartContract: {is: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}}}, Block: {Time: {since: "2024-06-27T11:01:18Z", till: "2024-06-27T12:01:18Z"}}}
    ) {
      buy: sum(of: Trade_AmountInUSD)
      sell: sum(of: Trade_Side_AmountInUSD)
      count
    }
  }
}

Similar queries