solana ohlc

Returns the latest 180 DEX trades by token on Solana, where currency mint address is 9SeCSd…pump, side type is buy and side type is sell: block time, sum of trade amount, sum of trade side amount in USD, trade amount, trade price, price in USD, currency name and 3 more fields.

By gaurav · saved 14 April 2026 · Bitquery API v2

What it returns

Filters

The query

{
  Solana(dataset: archive) {
    buy: DEXTradeByTokens(
      orderBy: {descendingByField: "Block_Timefield"}
      where: {Trade: {Side: {Type: {is: buy}}, Currency: {MintAddress: {is: "9SeCSdbPzz95KomGUGEV9Shn2zGXNmMJhE9J72Hipump"}}}, Block: {Time: {since_relative: {months_ago: 6}}}}
      limit: {count: 180}
    ) {
      Block {
        Timefield: Time(interval: {in: minutes, count: 1})
      }
      volume: sum(of: Trade_Amount)
      volumeUSD: sum(of: Trade_Side_AmountInUSD, selectWhere: {gt: "0"})
      Trade {
        max: Amount(maximum: Trade_Amount)
        high: Price(maximum: Trade_Price)
        low: Price(minimum: Trade_Price)
        open: Price(minimum: Block_Slot)
        close: Price(maximum: Block_Slot)
        highUSD: PriceInUSD(maximum: Trade_PriceInUSD)
        lowUSD: PriceInUSD(minimum: Trade_PriceInUSD)
        openUSD: PriceInUSD(minimum: Block_Slot)
        closeUSD: PriceInUSD(maximum: Block_Slot)
        Currency {
          Name
          Symbol
          MintAddress
        }
      }
      count
    }
    sell: DEXTradeByTokens(
      orderBy: {descendingByField: "Block_Timefield"}
      where: {Trade: {Side: {Type: {is: sell}}, Currency: {MintAddress: {is: "9SeCSdbPzz95KomGUGEV9Shn2zGXNmMJhE9J72Hipump"}}}, Block: {Time: {since_relative: {months_ago: 6}}}}
      limit: {count: 180}
    ) {
      Block {
        Timefield: Time(interval: {in: minutes, count: 1})
      }
      volume: sum(of: Trade_Amount)
      volumeUSD: sum(of: Trade_Side_AmountInUSD, selectWhere: {gt: "0"})
      Trade {
        max: Amount(maximum: Trade_Amount)
        high: Price(maximum: Trade_Price)
        low: Price(minimum: Trade_Price)
        open: Price(minimum: Block_Slot)
        close: Price(maximum: Block_Slot)
        highUSD: PriceInUSD(maximum: Trade_PriceInUSD)
        lowUSD: PriceInUSD(minimum: Trade_PriceInUSD)
        openUSD: PriceInUSD(minimum: Block_Slot)
        closeUSD: PriceInUSD(maximum: Block_Slot)
        Currency {
          Name
          Symbol
          MintAddress
        }
      }
      count
    }
  }
}

Similar queries