Dex price

Returns the latest 10 DEX trades on Ethereum, where pair smart contract is 0x11c2…8b2b, block time before 2024-02-03 and block time after 2024-02-03: 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 16 September 2025 · Bitquery API v2

What it returns

Filters

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

{
  "pairContract":"0x11c20a3b83ff206e4ab6b5935d766564925b8b2b",
  "network":"eth",
  "before":"2024-02-03T14:27:59Z",
  "after":"2024-02-03T14:22:00Z",
  "count":10
  
}

Similar queries