ohlc of a token pair 1 hour interval

Historical data The Trading cube covers real time and roughly the last 30 days. For anything older, rebuild the same numbers from raw trades with DEXTradeByTokens. Datasets: https://docs.bitquery.io/docs/graphql/dataset/archive/ Retention: https://docs.bitquery.io/docs/graphql/data-coverage-retenti

By Akshat · saved 24 February 2026 · run 2 times · Bitquery API v2

What it returns

Filters

The query

# Historical data
#   The Trading cube covers real time and roughly the last 30 days. For
#   anything older, rebuild the same numbers from raw trades with
#   DEXTradeByTokens.
#
# Datasets:  https://docs.bitquery.io/docs/graphql/dataset/archive/
# Retention: https://docs.bitquery.io/docs/graphql/data-coverage-retention/
#

query MyQuery { 
  Trading {
    Pairs(
      where: {Token: {Id: {is: "bid:eth:0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}}, QuoteToken: {Id: {is: "bid:eth:0xdac17f958d2ee523a2206206994597c13d831ec7"}}, Interval: {Time: {Duration: {eq: 3600}}}, Price: {IsQuotedInUsd: true}}
      limit: {count: 10}
      orderBy: {descending: Interval_Time_Start}
    ) {
      Token {
        Name
        Address
        Id
        NetworkBid
      }
      QuoteToken{
        Name
        Address
        Id
        NetworkBid
      }
      Price {
        Average {
          Mean
          Estimate
          ExponentialMoving
          SimpleMoving
          WeightedSimpleMoving
        }
        Ohlc {
          Open
          High
          Low
          Close
        }
      }
    }
  }
}

Similar queries