Trade metrics just like dexscreener

Returns one DEX trade on Ethereum, where pair smart contract is 0x3748…332E, block time since 2024-10-07 and block time till 2024-10-07: count, sum of trade buy amount in USD and sum of trade sell amount in USD.

By Chrome · saved 7 October 2024 · run 9 times · Bitquery API v2

What it returns

Filters

The query

query MyQuery {
  EVM(network: eth, dataset: combined) {
    DEXTrades(
      limit: {count: 1}
      where: {Block: {Time: {since: "2024-10-07T00:00:00Z", till: "2024-10-07T23:59:59Z"}}, TransactionStatus: {Success: true}, Trade: {Dex: {Pair: {SmartContract: {is: "0x374804A3d0c25d53dC4663ccE8e91E914F56332E"}}}}}
    ) {
      Makers: count(distinct: Transaction_From)
      buys: count(
        if: {Trade: {Sell: {Currency: {SmartContract: {is: "0x669f248381dC64f6f34234a376CAaf88a959e8Fa"}}}}}
      )
      buy_vol: sum(
        of: Trade_Buy_AmountInUSD
        if: {Trade: {Buy: {Currency: {SmartContract: {is: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"}}}}}
      )
      sells: count(
        if: {Trade: {Buy: {Currency: {SmartContract: {is: "0x669f248381dC64f6f34234a376CAaf88a959e8Fa"}}}}}
      )
      sell_vol: sum(
        of: Trade_Sell_AmountInUSD
        if: {Trade: {Sell: {Currency: {SmartContract: {is: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"}}}}}
      )
    }
  }
}

Similar queries