Websocket to catch transactions with specific buy currency on Ethereum network

Streams DEX trades on Ethereum as they happen, where buy currency smart contract is 0xB8c7…DD52: block time, buy amount, buy buyer, buy seller, buy price, buy price in USD, buy currency name and 13 more fields.

By Akshat · saved 9 May 2024 · run 2 times · Bitquery API v2

What it returns

Filters

The subscription

subscription {
  EVM(network: eth) {
    DEXTrades(
      where: {Trade: {Buy: {Currency: {SmartContract: {is: "0xB8c77482e45F1F44dE1745F52C74426C631bDD52"}}}}}
    ) {
      Block {
        Time
      }
      Trade {
        Buy {
          Amount
          Buyer
          Seller
          Price
          PriceInUSD
          Currency {
            Name
            SmartContract
            Symbol
          }
        }
        Dex {
          ProtocolFamily
          ProtocolName
          SmartContract
          Pair {
            SmartContract
          }
        }
        Sell {
          Amount
          Buyer
          Currency {
            SmartContract
            Symbol
            Name
          }
          Price
          PriceInUSD
          Seller
        }
      }
    }
  }
}

Similar queries