marissa example

Streams 10 DEX trades on Ethereum as they happen, where DEX owner address is 0x1f98…f984: protocol name, owner address, buy currency name, buy smart contract, sell currency name, sell smart contract and transaction hash.

By Divyasshree N · saved 23 August 2023 · Bitquery API v2

What it returns

Filters

The subscription

subscription {
  EVM(network: eth) {
    DEXTrades(
      where: {Trade: {Dex: {OwnerAddress: {is: "0x1f98431c8ad98523631ae4a59f267346ea31f984"}}}}
      limit: {count: 10}
      limitBy: {by: Trade_Sell_Currency_SmartContract, count: 1}
    ) {
      Trade {
        Dex {
          ProtocolName
          OwnerAddress
        }
        Buy {
          Currency {
            Name
            SmartContract
          }
        }
        Sell {
          Currency {
            Name
            SmartContract
          }
        }
      }
      Transaction {
        Hash
      }
    }
  }
}

Similar queries