Dex price

Returns the latest DEX trades on Ethereum: buy currency symbol, buy smart contract, buy fungible, buy decimals, buy currency name, buy price, buy price in USD and 9 more fields.

By Francesco Gasparetto · saved 29 September 2025 · run 5 times · Bitquery API v2

What it returns

The query

query ($network: evm_network, $pairContract: String!, $before: DateTime, $after: DateTime, $count: Int) {
  EVM(network: $network, dataset: archive) {
    DEXTrades(
      orderBy: {descending: Block_Time}
      where: {Trade: {Dex: {Pair: {SmartContract: {is: $pairContract}}}}, TransactionStatus: {Success: true}, Block: {Time: {before: $before, after: $after}}}
      limit: {count: $count}
    ) {
      Trade {
        Buy {
          Currency {
            Symbol
            SmartContract
            Fungible
            Decimals
            Name
          }
          Price_against_sell_currency: Price
          Price_usd: PriceInUSD
        }
        Sell {
          Currency {
            Symbol
            SmartContract
            Fungible
            Decimals
            Name
          }
          Price_against_buy_currency: Price
          Price_usd: PriceInUSD
        }
      }
      Block {
        Number
        Time
      }
    }
  }
}

Variables

{
  "blockNumber":"15883015",
  "contract":"0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852",
  "network":"eth"
}

Similar queries