query_ohlc_quantile__

Returns 10 DEX trades by token on Solana, where currency mint address is So1111…1112, side currency mint address is EPjFWd…Dt1v and trade amount is above 0, sorted by block time: block time, quantile of trade price, median of trade price, quantile of trade side amount, median of trade side amount, sum of trade side amount, trade price and 4 more fields.

By d4fdfdf · saved 10 August 2025 · Bitquery API v2

What it returns

Filters

The query

query TradesSolToken($ca: String!, $currencies: [String!], $dataset: dataset_arg_enum, $interval: Int) {
  Solana(dataset: $dataset) {
    DEXTradeByTokens(
      limit: {count: 10}
      orderBy: {ascendingByField: "Block_Time"}
      where: {Trade: {Amount: {gt: "0"}, Currency: {MintAddress: {is: $ca}}, Side: {Currency: {MintAddress: {in: $currencies}}}}, Transaction: {Result: {Success: true}}}
    ) {
      Block {
        Time(interval: {count: $interval, in: minutes})
      }
      px_pct_25th: quantile(of: Trade_Price, level: 0.25)
      px_pct_75th: quantile(of: Trade_Price, level: 0.75)
      px_median: median(of: Trade_Price)
      qty_pct_25th: quantile(of: Trade_Side_Amount, level: 0.25)
      qty_pct_75th: quantile(of: Trade_Side_Amount, level: 0.75)
      qty_median: median(of: Trade_Side_Amount)
      
      volume: sum(of: Trade_Side_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
          }
        }
      }
    }
  }
}

Variables

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

Similar queries