TokenOHLCV Solana

Returns 400 DEX trades by token on Solana, where currency mint address is JUPyiw…DvCN, side currency mint address is So1111…1112 and DEX protocol family is Raydium, sorted by block timefield: block time, price in USD, sum of trade amount, sum of trade side amount in USD and count.

By gaurav · saved 26 August 2026 · Bitquery API v2

What it returns

Filters

The query

query TokenOHLCV($token: String!, $quote: String!, $since: DateTime!, $till: DateTime!) {
  Solana(dataset: combined) {
    DEXTradeByTokens(
      orderBy: {ascendingByField: "Block_Timefield"}
      where: {Trade: {Currency: {MintAddress: {is: $token}}, Side: {Currency: {MintAddress: {is: $quote}}}, Dex: {ProtocolFamily: {is: "Raydium"}}}, Block: {Time: {since: $since, till: $till}}}
      limit: {count: 400}
    ) {
      Block {
        Timefield: Time(interval: {in: minutes, count: 1})
      }
      Trade {
        open: PriceInUSD(minimum: Block_Slot)
        high: PriceInUSD(maximum: Trade_PriceInUSD)
        low: PriceInUSD(minimum: Trade_PriceInUSD)
        close: PriceInUSD(maximum: Block_Slot)
      }
      volumeToken: sum(of: Trade_Amount)
      volumeUSD: sum(of: Trade_Side_AmountInUSD)
      trades: count
    }
  }
}

Variables

{
  "token": "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN",
  "quote": "So11111111111111111111111111111111111111112",
  "since": "2025-09-01T00:00:00Z",
  "till": "2025-09-07T00:00:00Z"
}

Similar queries