ticket#__8341_query_1

Returns the latest 10 DEX trades on Ethereum: buy smart contract, buy currency name, buy amount, sell currency name, sell smart contract, sell amount, block time and 2 more fields.

By Omkar_BQ · saved 22 April 2024 · Bitquery API v2

What it returns

The query

query MyQuery {
  EVM(dataset: combined, network: eth) {
    DEXTrades(
      where: {any: [{Trade: {Buy: {Currency: {SmartContract: {is: "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"}}}}}, {Trade: {Sell: {Currency: {SmartContract: {is: "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"}}}}}]}
      orderBy: {descending: Block_Number}
      limit: {count: 10}
    ) {
      Trade {
        Buy {
          Currency {
            SmartContract
            Name
          }
          Amount
        }
        Sell {
          Currency {
            Name
            SmartContract
          }
          Amount
        }
      }
      Block {
        Time
      }
      Transaction {
        Hash
        From
      }
    }
  }
}

Similar queries