WETH buy currecncy, ownerAddress, Pair address

Returns the latest 5 DEX trades on Ethereum, where buy currency smart contract is 0xc02a…6cc2: block number, block time, from, to, transaction hash, buy amount, buy buyer and 18 more fields.

By Vishal · saved 5 June 2024 · Bitquery API v2

What it returns

Filters

The query

{
  EVM(dataset: archive, network: eth) {
    buyside: DEXTrades(
      limit: {count: 5}
      orderBy: {descending: Block_Time}
      where: {Trade: {Buy: {Currency: {SmartContract: {is: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}}}}}
    ) {
      Block {
        Number
        Time
      }
      Transaction {
        From
        To
        Hash
      }
      Trade {
        Buy {
          Amount
          Buyer
          Currency {
            Name
            Symbol
            SmartContract
          }
          Seller
          Price
        }
        Sell {
          Amount
          Buyer
          Currency {
            Name
            SmartContract
            Symbol
          }
          Seller
          Price
        }
        Dex {
          ProtocolFamily
          ProtocolName
          SmartContract
          Pair {
            SmartContract
            Name
            Symbol
          }
          OwnerAddress
        }
      }
    }
  }
}

Similar queries