sdsdsd

latest trades for a token - both buy and sell

Returns the latest 100 DEX trades on Ethereum, where buy currency smart contract is 0xc02a…6cc2 and buy seller is 0x9dda…2c42: buy buyer, buy amount, buy currency name, buy smart contract, buy seller, block time and transaction hash.

By Omkar_BQ · saved 22 December 2023 · Bitquery API v2

What it returns

Filters

The query

query MyQuery {
  EVM(dataset: combined, network: eth) {
    Buys: DEXTrades(
      where: {Trade: {Buy: {Currency: {SmartContract: {is: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}}, Seller: {is: "0x9dda370f43567b9c757a3f946705567bce482c42"}}}, Block: {}}
      orderBy: {descending: Block_Number}
      limit: {count: 100}
    ) {
      Trade {
        Buy {
          Buyer
          Amount
          Currency {
            Name
            SmartContract
          }
          Seller
        }
      }
      Block {
        Time
      }
      Transaction {
        Hash
      }
    }
  }
}

Similar queries