subscribe to dex trades on ethereum mainnet

Streams DEX trades on Ethereum as they happen, where pair smart contract is 0x88e6…5640: block number, block time, transaction hash, buy buyer, buy amount in USD, buy amount, buy seller and 17 more fields.

By James Corbett · saved 10 February 2025 · Bitquery API v2

What it returns

Filters

The subscription

subscription MyQuery {
  EVM(network: eth) {
    DEXTrades(
      where: {Trade: {Dex: {Pair: {SmartContract: {is: "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640"}}}}}
    ) {
      Block {
        Number
        Time
      }
      Transaction {
        Hash
      }
      Trade {
        Buy {
          Buyer
          AmountInUSD
          Amount
          Seller
          PriceInUSD
          Price
          Currency {
            Name
            Symbol
            SmartContract
          }
        }
        Dex {
          SmartContract
          ProtocolName
          ProtocolVersion
        }
        Sell {
          Buyer
          AmountInUSD
          Amount
          Seller
          PriceInUSD
          Price
          Currency {
            Name
            Symbol
            SmartContract
          }
        }
      }
    }
  }
}

Similar queries