OHLC price of an uniswap pair

Returns pairs, where token address is 0xc02a…6cc2, quote token address is 0xa0b8…eb48 and market network is Ethereum, sorted by interval time end, highest first: start, end, open, high, low, close, market address and 9 more fields.

By Kshitij Mahajan · saved 5 August 2025 · run 7 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: Interval_Time_End}
    ) {
      Interval{
        Time{
          Start
          End
        }
      }
      Price{
        Ohlc{
          Open
          High
          Low
          Close
        }
      }
      Market{
        Address
        ProtocolFamily
        Protocol
        Program
      }
      QuoteToken{
        Address
        Name
        Symbol
      }
      Token{
        Address
        Name
        Symbol
      }
    }
  }
}

Similar queries