error ohlc

Returns the latest 360 DEX trades by token on Solana, where currency mint address is pumpCm…9Dfn, side currency mint address is So1111…1112 and block time after 2025-08-11: block time, sum of trade side amount in USD, quantile of trade price in USD, price in USD and trade price.

By gaurav · saved 14 August 2025 · run 3 times · Bitquery API v2

What it returns

Filters

The query

query SolanaTokenHistoricalData($tokenAddress: String!, $quoteTokenAddresses: [String!]!, $timeInterval: OLAP_DateTimeIntervalUnits!, $intervalCount: Int!, $limit: Int!, $after: DateTime, $afterDate: String, $before: DateTime, $beforeDate: String) {
  Solana(dataset: combined) {
    DEXTradeByTokens(
      orderBy: {descendingByField: "Block_Time"}
      where: {Block: {Time: {after: $after, before: $before}, Date: {before: $beforeDate, after: $afterDate}}, Trade: {Currency: {MintAddress: {is: $tokenAddress}}, Side: {Currency: {MintAddress: {in: $quoteTokenAddresses}}, AmountInUSD: {ge: "0.5"}}, PriceAsymmetry: {le: 0.1}}, Transaction: {Result: {Success: true}}}
      limit: {count: $limit}
    ) {
      Block {
        Time(interval: {count: $intervalCount, in: $timeInterval})
      }
      volume: sum(of: Trade_Side_AmountInUSD)
      high: quantile(of: Trade_PriceInUSD, level: 0.9)
      low: quantile(of: Trade_PriceInUSD, level: 0.1)
      Trade {
        open: PriceInUSD(minimum: Block_Slot)
        openNative: Price(minimum: Block_Slot)
        close: PriceInUSD(maximum: Block_Slot)
        closeNative: Price(maximum: Block_Slot)
      }
    }
  }
}

Variables

{
  "after": "2025-08-11T09:30:00Z",
  "afterDate": "2025-08-10",
  "before": "2025-08-11T12:15:00Z",
  "beforeDate": "2025-08-12",
  "intervalCount": 15,
  "limit": 360,
  "quoteTokenAddresses": [
    "So11111111111111111111111111111111111111112"
  ],
  "timeInterval": "minutes",
  "tokenAddress": "pumpCmXqMfrsAkQ5r49WcJnRayYRqmXz6ae8H7H9Dfn"
}

Similar queries