OHLCV_ok_20250615

Solana OHLCV for given token by interval with limit

Returns the latest 269 DEX trades by token on Solana, where currency mint address is 2ru87k…pump, side currency mint address is So1111…1112 and block time since 2025-01-26: block time, sum of trade amount in USD, sum of trade amount, currency name, currency symbol, currency mint address, side currency name and 8 more fields.

By mr 0x · saved 15 June 2025 · Bitquery API v2

What it returns

Filters

The query

query GetOHLCV(
  $mintAddress: String
  $interval: OLAP_DateTimeIntervalUnits
  $intervalCount: Int
  $limit: Int
) {
  Solana {
    DEXTradeByTokens(
      orderBy: { descendingByField: "Block_Time" }
      where: { Trade: { Currency: { MintAddress: { is: $mintAddress } }, Side: { Currency: { MintAddress: { is: "So11111111111111111111111111111111111111112" } } }, PriceAsymmetry: { lt: 0.1 } }, Block: { Time: { since: "2025-01-26T11:03:00Z" } } }
      limit: { count: $limit }
    ) {
      Block {
        Time(interval: { in: $interval, count: $intervalCount })
        lastTradeTime: Time(maximum: Block_Time)
        firstTradeTime: Time(minimum: Block_Time)
      }
      volumeUSD: sum(of: Trade_AmountInUSD)
      volume: sum(of: Trade_Amount)
      Trade {
        Currency {
          Name
          Symbol
          MintAddress
        }
        Side {
          Currency {
            Name
            Symbol
            MintAddress
          }
        }
        Dex {
          ProgramAddress
          ProtocolFamily
          ProtocolName
        }
        highUSD: PriceInUSD(maximum: Trade_Price)
        lowUSD: PriceInUSD(minimum: Trade_Price)
        openUSD: PriceInUSD(minimum: Block_Slot)
        closeUSD: PriceInUSD(maximum: Block_Slot)
        high: Price(maximum: Trade_Price)
        low: Price(minimum: Trade_Price)
        open: Price(minimum: Block_Slot)
        close: Price(maximum: Block_Slot)
      }
      count
    }
  }
}

Variables

{
  "mintAddress": "2ru87k7yAZnDRsnqVpgJYETFgqVApuBcwB2xDb19pump",
  "interval": "hours",
  "intervalCount": 1,
  "limit": 269
}

Similar queries