historic ohlcv

Returns the latest tokens: start, USD, open, close, low and high.

By Kshitij Mahajan · saved 28 May 2026 · Bitquery API v2

What it returns

The query

query HistoricalOhlcv(
      $network: String!,
      $tokenAddress: String!,
      $resolution: Int!,
      $from: DateTime!,
      $to: DateTime!,
      $limit: Int!
    ) {
      Trading {
        Tokens(
          where: {
            Token: { Network: { is: $network }, Address: { is: $tokenAddress } }
            Interval: { Time: { Duration: { eq: $resolution } } }
            Block: { Time: { since: $from, till: $to } }
          }
          orderBy: { descending: Block_Time }
          limit: { count: $limit }
        ) {
          Interval { Time { Start } }
          Volume { Usd }
          Price { Ohlc { Open Close Low High } }
        }
      }
    }

Variables

{
  "network": "bsc",
  "tokenAddress": "0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c",
  "resolution": 3600,
  "limit": 1000,
  "from": "2026-05-20T00:00:00"
  "to": "2026-05-27T00:00:00",
}

Similar queries