Historical Token OHLC Multi Chains

get volume, price of token stream

Returns pairs, where currency ID is bid:eth, quote currency ID is usdc and time duration is 3600, sorted by interval time start: token ID, token symbol, token address, network bid, network, token name, quote token ID and 14 more fields.

By Kshitij Mahajan · saved 24 June 2026 · run 5 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/
#
# For more info on the endpoint visit -
# https://docs.bitquery.io/docs/trading/crypto-price-api/introduction/
# For faster results try using indexed feilds in where and orderBy clause -
# https://docs.bitquery.io/docs/graphql/indexed-fields-reference/

query HistoricalOHLC {
  Trading {
    Pairs(
      orderBy: {ascending: Interval_Time_Start}
      where: {Price: {IsQuotedInUsd: false}, Interval: {Time: {Duration: {eq: 3600}}}, Currency: {Id: {is: "bid:eth"}}, QuoteCurrency: {Id: {is: "usdc"}}, Block: {Date: {till_relative: {days_ago: 7}, since_relative: {days_ago: 30}}}}
    ) {
      Token {
        Id
        Symbol
        Address
        NetworkBid
        Network
        Name
      }
      QuoteToken {
        Id
        Symbol
        Address
        Name
        NetworkBid
      }
      Interval {
        Time {
          Start
          End
          Duration
        }
      }
      Volume {
        Usd
        Quote
        Base
      }
      Price {
        IsQuotedInUsd
        Ohlc {
          Open
          High
          Low
          Close
        }
      }
    }
  }
}

Similar queries