latest trade price of uniswap pair

Returns the latest pair, where token address is 0xc02a…6cc2, quote token address is 0xa0b8…eb48 and market network is Ethereum: block time, mean, simple moving, weighted simple moving, exponential moving, market address, protocol family and 2 more fields.

By Kshitij Mahajan · saved 5 August 2025 · run 3 times · Bitquery API v2

What it returns

Filters

The query

query MyQuery {
  Trading(dataset:realtime) {
    Pairs(
      where: {
        Token: {Address: {is: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}}, 
        QuoteToken: {Address: {is: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"}},
        Market: {Network: {is: "Ethereum"} ProtocolFamily: {is: "Uniswap"}}
        Interval: {Time: {Duration: {eq: 60}}}
      }
      orderBy: {descending: Block_Time}
      limit: {count:1}
    ) {
      Block {
        Time
      }
      Price{
        Average{
          Mean
          SimpleMoving
          WeightedSimpleMoving
          ExponentialMoving
        }
      }
      Market{
        Address
        ProtocolFamily
        Protocol
        Program
      }
    }
  }
}

Similar queries