OHLC trades

Returns prediction trades on Polygon, where outcome token asset ID is 501167…4357, block time since 2026-02-23 and block time till 2026-02-26, sorted by block interval, highest first: outcome trade price, sum of trade outcome trade collateral amount, sum of trade outcome trade collateral amount in USD and block time.

By Aleksey · saved 25 February 2026 · Bitquery API v2

What it returns

Filters

The query

query questionTV($from: DateTime!, $to: DateTime!, $resolution: Int!, $intervalType: OLAP_DateTimeIntervalUnits!, $assetId: String!) {
  EVM(network: matic) {
    PredictionTrades(
      where: {TransactionStatus: {Success: true}, Trade: {Prediction: {OutcomeToken: {AssetId: {is: $assetId}}}}, Block: {Time: {since: $from, till: $to}}}
      orderBy: {descendingByField: "Block_interval"}
    ) {
      Trade {
        OutcomeTrade {
          open: Price(minimum: Block_Time)
          close: Price(maximum: Block_Time)
          max: Price(maximum: Trade_OutcomeTrade_Price)
          min: Price(minimum: Trade_OutcomeTrade_Price)
        }
      }
      vol: sum(of: Trade_OutcomeTrade_CollateralAmount)
      volUsd: sum(of: Trade_OutcomeTrade_CollateralAmountInUSD)
      Block {
        interval: Time(interval: {count: $resolution, in: $intervalType})
      }
    }
  }
}

Variables

{
  "assetId": "50116734019987172723512210736554637313833478290473720338056637715562261284357",
  "from": "2026-02-23T14:33:33Z",
  "intervalType": "minutes",
  "resolution": 5,
  "to": "2026-02-26T22:23:33Z"
}

Similar queries