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 0xdAC1…1ec7: block time, buy amount, buy buyer, buy seller, buy price, buy price in USD, buy currency name and 14 more fields.

By Akshat · saved 9 May 2024 · Bitquery API v2

What it returns

Filters

The subscription

subscription {
  EVM(network: eth) {
    DEXTrades(
      where: {Trade: {Buy: {Currency: {SmartContract: {is: "0xdAC17F958D2ee523a2206206994597C13D831ec7"}}}}}
    ) {
      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
        }
      }
      Transaction{
        Hash
      }
    }
  }
}

Similar queries