Realtime price update

Streams DEX trades by token on Polygon as they happen, where currency smart contract is 0x53e0…ad39 and trade price in USD is above 0: block time and average of trade price in USD.

By Aleksey · saved 17 May 2024 · Bitquery API v2

What it returns

Filters

The subscription

subscription(
  $network: evm_network 
	$currency: String
) {
  EVM(network: $network ) {
    DEXTradeByTokens(  
      where: {
      
        Trade: {
          PriceInUSD: {
            gt: 0
          }
          Currency: {
            SmartContract: {
              is: $currency
            }
          }
        }
        
      }
    
    ) {
      
      Block {
        Time
      }
      
      average(of: Trade_PriceInUSD)
      
    
      
    }
  }
}

Variables

{
  "network": "matic",
  "currency": "0x53e0bca35ec356bd5dddfebbd1fc0fd03fabad39"
}

Similar queries