EVM Dex

Returns the latest DEX trade on Ethereum, where pair smart contract is 0x9c4f…7c4c and block number is at most 21929720: buy currency symbol, buy price, sell currency symbol, block date, block number and transaction hash.

By Francesco Gasparetto · saved 5 March 2025 · Bitquery API v2

What it returns

Filters

The query

query MyQuery {
  EVM(network: eth, dataset: archive) {
    DEXTrades(
      orderBy: {descending: Block_Time}
      where: {Trade: {Dex: {Pair: {SmartContract: {is: "0x9c4fe5ffd9a9fc5678cfbd93aa2d4fd684b67c4c"}}}}, TransactionStatus: {Success: true}, Block: {Number: {le: "21929720"}}}
      limit: {count: 1}
    ) {
      Trade {
        Buy {
          Currency {
            Symbol
          }
          Price_against_sell_currency: Price
        }
        Sell {
          Currency {
            Symbol
          }
        }
      }
      Block {
        Date
        Number
      }
      Transaction {
        Hash
      }
    }
  }
}

Similar queries