Skip to main content
GoldRush exposes two OHLCV streams on SOLANA_MAINNET:
  • ohlcvCandlesForPair - candles for a specific pool address.
  • ohlcvCandlesForToken - candles aggregated across pools carrying that SPL mint.
Both deliver candles in real time over WebSocket as new swaps land in the pool.

Stream candles for a specific pool

Best for charting one pool.
GraphQL Subscription
subscription {
  ohlcvCandlesForPair(
    chain_name: SOLANA_MAINNET
    pair_addresses: ["58oQChx4yWmvKdwLLZzBi4ChoCc2fqCUWBkwMihLYQo2"]
    interval: ONE_MINUTE
    timeframe: ONE_HOUR
  ) {
    pair_address
    timestamp
    open
    high
    low
    close
    volume_usd
  }
}
pair_addresses is an array of base58 pool addresses. You can subscribe to multiple pools on one subscription.

Stream candles for a token (across all pools)

ohlcvCandlesForToken aggregates across pools carrying that mint.
subscription {
  ohlcvCandlesForToken(
    chain_name: SOLANA_MAINNET
    token_addresses: ["EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"]
    interval: ONE_MINUTE
    timeframe: ONE_HOUR
  ) {
    timestamp
    open
    high
    low
    close
    volume_usd
  }
}

When to use pairs vs tokens

Use caseStream
Chart a single poolohlcvCandlesForPair with the pool address
Track arbitrage between two venues for the same pairohlcvCandlesForPair with both pool addresses
Get the USD price of a token aggregated across poolsohlcvCandlesForToken

Patterns

TradingView chart

Subscribe to ohlcvCandlesForPair at the user’s selected interval; push candles into TradingView’s UDF datafeed adapter. The timestamp / open / high / low / close / volume_usd fields map 1:1 to UDF.

Discovery → chart

Pair this stream with the DEX firehose: when a new pool appears in newPairs, automatically subscribe to its OHLCV. Limit to pools above a liquidity threshold to avoid spam.

Pricing service

Use ohlcvCandlesForToken on 1d candles for an aggregated USD price.