solana ohlc

Returns 1000 DEX trades by token on Solana, where currency mint address is 5c74v6…G63V, side currency mint address is So1111…1112 and block time after 2025-06-25, sorted by block timefield: block time, sum of trade amount and trade price.

By gaurav · saved 25 June 2025 · Bitquery API v2

What it returns

Filters

The query

query getTokenOHLCV {
  Solana {
    DEXTradeByTokens(
      orderBy: {ascendingByField: "Block_Timefield"}
      limit: {count: 1000}
      where: {Trade: {Currency: {MintAddress: {is: "5c74v6Px9RKwdGWCfqLGfEk7UZfE3Y4qJbuYrLbVG63V"}}, Side: {Currency: {MintAddress: {is: "So11111111111111111111111111111111111111112"}}}}, Block: {Time: {after: "2025-06-25T12:08:05.046Z"}}, Transaction: {Result: {Success: true}}}
    ) {
      Block {
        Timefield: Time(interval: {in: seconds, count: 15})
      }
      volume: sum(of: Trade_Amount)
      Trade {
        open: Price(minimum: Block_Slot)
        high: Price(maximum: Trade_Price)
        low: Price(minimum: Trade_Price)
        close: Price(maximum: Block_Slot)
      }
    }
  }
}

Similar queries