query_ohlc_quantile__

Returns DEX trades by token on Solana, where currency mint address is So1111…1112, side currency mint address is EPjFWd…Dt1v and block time since 2025-04-17, sorted by block time: block time, quantile of trade price, median of trade price, sum of trade side amount, side currency name and side currency symbol.

By Omkar_BQ · saved 23 April 2025 · run 7 times · Bitquery API v2

What it returns

Filters

The query

query TradesSolToken($ca: String!, $currencies: [String!], $dataset: dataset_arg_enum, $interval: Int, $from: DateTime, $to: DateTime) {
  Solana(dataset: $dataset) {
    DEXTradeByTokens(
      orderBy: {ascendingByField: "Block_Time"}
      where: {Trade: {Amount: {gt: "0"}, Currency: {MintAddress: {is: $ca}}, Side: {Currency: {MintAddress: {in: $currencies}}}}, Transaction: {Result: {Success: true}}, Block: {Time: {since: $from, till: $to}}}
    ) {
      Block {
        Time(interval: {count: $interval, in: minutes})
      }
      min: quantile(of: Trade_Price, level: 0.05)
      max: quantile(of: Trade_Price, level: 0.95)
      close: median(of: Trade_Price)
      open: median(of: Trade_Price)
      volume: sum(of: Trade_Side_Amount)
      Trade {
        Side {
          Currency {
            Name
            Symbol
          }
        }
      }
    }
  }
}

Variables

{
  "interval": 1,
  "dataset": "archive",
  "from": "2025-04-17T19:21:30Z",
  "to": "2025-04-17T19:22:00Z",
  "ca": "So11111111111111111111111111111111111111112", 
  "currencies": ["EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"]
}

Similar queries