SOLANA_MAINNET:
ohlcvCandlesForPair- candles for a specific pool address.ohlcvCandlesForToken- candles aggregated across pools carrying that SPL mint.
Stream candles for a specific pool
Best for charting one pool.GraphQL Subscription
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.
When to use pairs vs tokens
| Use case | Stream |
|---|---|
| Chart a single pool | ohlcvCandlesForPair with the pool address |
| Track arbitrage between two venues for the same pair | ohlcvCandlesForPair with both pool addresses |
| Get the USD price of a token aggregated across pools | ohlcvCandlesForToken |
Patterns
TradingView chart
Subscribe toohlcvCandlesForPair 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 innewPairs, automatically subscribe to its OHLCV. Limit to pools above a liquidity threshold to avoid spam.
Pricing service
UseohlcvCandlesForToken on 1d candles for an aggregated USD price.
Related
- DEX firehose - discover new pools to subscribe to.
- OHLCV Pairs Stream reference - full subscription schema.
- OHLCV Tokens Stream reference - full subscription schema.