OHLC for a token

Returns 3 DEX trades by token on Solana, where market market address is 4DoNfF…pRgg, sorted by block timefield: block time, quantile of trade price, median of trade price, count, sum of trade amount, trade price, currency name and 5 more fields.

By d4fdfdf · saved 10 August 2025 · Bitquery API v2

What it returns

Filters

The query

{
  Solana(dataset: archive) {
    DEXTradeByTokens(
      limit: {count: 3}
      orderBy: {ascendingByField: "Block_Timefield"}
      where: {Trade: {Market: {MarketAddress: {is: "4DoNfFBfF7UokCC2FQzriy7yHK6DY6NVdYpuekQ5pRgg"}}}}
    ) {
      Block {
        Timefield: Time(interval: {in: minutes, count: 30})
      }
      px_pct_1th: quantile(of: Trade_Price, level: 0.01)
      px_pct_25th: quantile(of: Trade_Price, level: 0.25)
      px_pct_75th: quantile(of: Trade_Price, level: 0.75)
      px_pct_99th: quantile(of: Trade_Price, level: 0.99)
      px_median: median(of: Trade_Price)
      count
      volume: sum(of: Trade_Amount)
      Trade {
        high: Price(maximum: Trade_Price)
        low: Price(minimum: Trade_Price)
        open: Price(minimum: Block_Slot)
        close: Price(maximum: Block_Slot)
        Currency {
          Name
          Symbol
        }
        Side {
          Currency {
            Name
            Symbol
          }
          min_quote_qty: Amount(minimum: Trade_Side_Amount)
          max_quote_qty: Amount(maximum: Trade_Side_Amount)
        }
        min_base_qty: Amount(minimum: Trade_Amount)
        max_base_qty: Amount(maximum: Trade_Amount)
      }
    }
  }
}

Variables

{
  "interval": 30,
  "dataset": "combined",
  "ca": "So11111111111111111111111111111111111111112",
  "currencies": [
    "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
  ]
}

Similar queries