Average-Price-of-a-Pair-Illustration

Streams DEX trades as they happen, where sell currency smart contract is 0xdAC1…1ec7 and buy currency smart contract is 0xc02a…6cc2: average of trade buy price.

By Kshitij Mahajan · saved 21 June 2024 · run 3 times · Bitquery API v2

What it returns

Filters

The subscription

subscription{
  EVM {
    DEXTrades(
      where: {Trade: {Sell: {Currency: {SmartContract: {is: "0xdAC17F958D2ee523a2206206994597C13D831ec7"}}}, Buy: {Currency: {SmartContract: {is: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}}}}}
    ) {
      average(of: Trade_Buy_Price)
    }
  }
}

Similar queries