Solana candles query

Query Solana Candles for a Time Range (with percentile filtering)

Returns DEX trades by token on Solana, where currency mint address is So1111…1112, side currency mint address is EPjFWd…Dt1v or Es9vMF…wNYB and block time before 2025-06-26, sorted by block timefield: block time, sum of trade side amount in USD, quantile of trade price in USD, price in USD and count.

By YP · saved 27 June 2025 · run 5 times · Bitquery API v2

What it returns

Filters

The query

{
  Solana {
    DEXTradeByTokens(
      orderBy: {ascendingByField: "Block_Timefield"}
      where: {Trade: {Currency: {MintAddress: {is: "So11111111111111111111111111111111111111112"}}, Side: {Currency: {MintAddress: {in: ["EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"]}}, AmountInUSD: {ge: "1"}}}, Transaction: {Result: {Success: true}}, Block: {Time: {before: "2025-06-26T18:00:00Z", after: "2025-06-25T18:00:00Z"}}}
    ) {
      Block {
        Timefield: Time(interval: {in: minutes, count: 60})
      }
      volume: sum(of: Trade_Side_AmountInUSD)
      min: quantile(of: Trade_PriceInUSD, level: 0.01)
      max: quantile(of: Trade_PriceInUSD, level: 0.99)
      Trade {
        open: PriceInUSD(minimum: Block_Slot)
        close: PriceInUSD(maximum: Block_Slot)
      }
      count
    }
  }
}

Similar queries