Trade metrics just like dexscreener

Returns DEX trades on Ethereum, where block time since 2024-05-29 and block time till 2024-05-30: count, sum of trade buy amount in USD and sum of trade sell amount in USD.

By Praveen · saved 2 August 2024 · run 2 times · Bitquery API v2

What it returns

Filters

The query

query MyQuery($poolAddresses: [String!]) {
  EVM(network: eth, dataset: combined) {
    DEXTrades(
      where: {Block: {Time: {since: "2024-05-29T09:15:00Z", till: "2024-05-30T09:15:00Z"}}, TransactionStatus: {Success: true}}
    ) {
      Makers: count(distinct: Transaction_From)
      buys: count(
        if: {Trade: {Sell: {Currency: {SmartContract: {is: "0xaaeE1A9723aaDB7afA2810263653A34bA2C21C7a"}}}}}
      )
      buy_vol: sum(
        of: Trade_Buy_AmountInUSD
        if: {Trade: {Buy: {Currency: {SmartContract: {in: $poolAddresses}}}}}
      )
      sells: count(
        if: {Trade: {Buy: {Currency: {SmartContract: {is: "0xaaeE1A9723aaDB7afA2810263653A34bA2C21C7a"}}}}}
      )
      sell_vol: sum(
        of: Trade_Sell_AmountInUSD
        if: {Trade: {Sell: {Currency: {SmartContract: {in: $poolAddresses}}}}}
      )
    }
  }
}

Variables

{
  "poolAddresses" : ["0x42619f1eb89b993f7f5193de6ab1423a703fc344","0x44cc738e692921e7ac967367b800b8e132e5c8e7"]
}

Similar queries