Fetch latest price on Uniswap

Returns the latest 100 DEX trades on Ethereum, where base currency is 0x2b59…eb39, quote currency is 0xdac1…1ec7 and exchange name is Uniswap: timestamp time, block height, base amount, quote amount, count and quote price.

By Keith · saved 7 June 2022 · run 6 times · Bitquery API v1

What it returns

Filters

The query

{
  ethereum(network: ethereum) {
    dexTrades(
      options: {limit: 100, desc: "block.timestamp.time"}
      exchangeName: {is: "Uniswap"}
      baseCurrency: {is: "0x2b591e99afE9f32eAA6214f7B7629768c40Eeb39"}
      quoteCurrency: {is: "0xdac17f958d2ee523a2206206994597c13d831ec7"}
    ) {
      block {
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
        height
      }
      # baseCurrency {
      #   symbol
      #   address
      # }
      baseAmount
      # quoteCurrency {
      #   symbol 
      #   address
      # } 
      quoteAmount
      trades: count
      quotePrice
    }
  }
}

Similar queries