Solana OHLC Candlestick Data

Fetch clean Solana OHLC candles by token, market, or rebuilt trade history using Vybe’s API for charting, backtesting, filtering and CSV export.

Most price charts look simple only after the hard part is solved.

On Solana, candle data gets messy fast. One token can trade across multiple pools, multiple DEXs, and multiple quote assets at the same time. That means a basic request like “show me the price chart” quickly turns into harder questions. Which markets should count? Which ones should be ignored? How do you avoid fake wicks and junk liquidity? When should you trust a token-level candle, and when should you rebuild OHLC from raw trades yourself?

Vybe’s Fetch OHLC Candles guide describes a token-candles API that returns clean USD-denominated OHLC data sourced from vetted markets only, with support for multiple resolutions, volume, trade count, time windows, pagination, and optional gap handling.

The underlying endpoint is GET /v4/tokens/{mintAddress}/candles.

The guide explicitly positions it for charting, backtesting, alerts, and quantitative analysis, while also explaining why vetted markets matter for avoiding fake wicks and manipulated pools.

The companion repo solana-ohlc-api, shows what that looks like as a full product. It wires token candles, market candles, historical trades, token metadata, and labeled programs into a working candlestick UI with export and filtering controls. In other words, the docs explain the data model, and the repo shows how to turn it into a real charting experience.

Try the live demo: https://solana-ohlc-api.vybenetwork.com

It maps directly to the relevant Vybe pages

Why OHLC candles matter

OHLC data is one of the cleanest ways to turn fragmented onchain trading activity into something usable.

Vybe’s guide frames token candles as the answer to a simple but foundational question: what did the price do over time? The endpoint returns open, high, low, close, volume, USD volume, and trade count across multiple resolutions, and it does so using vetted markets only. That matters because if you chart everything indiscriminately, you end up visualizing noise instead of price discovery.

That makes OHLC candles useful for:

  • charting and trading UI

  • backtesting and quant workflows

  • alerts and threshold-based systems

  • volatility and spread analysis

  • volume overlays and market activity analysis

The repo reinforces that product angle. It is not just a wrapper around one endpoint. It shows how token candles, market candles, and rebuilt-from-trades candles can live side by side in one interface, so users can move between a clean default price view and a more hands-on reconstruction workflow when they need deeper control.

What the API call actually looks like

The candle flow starts with Vybe’s GET /v4/tokens/{mintAddress}/candles endpoint, documented in both the Fetch OHLC Candles guide and the endpoint reference. The guide describes it as a clean USD-denominated OHLC API sourced from vetted liquidity pools, designed for charting, backtesting, alerts, and quantitative analysis.

A basic request from the docs looks like this:

curl "https://api.vybenetwork.com/v4/tokens/So11111111111111111111111111111111111111112/candles?resolution=1h&limit=24" \
  -H "X-API-Key: YOUR_API_KEY"

That is the simplest version: give Vybe a token mint, choose a resolution, and get back a candle series that already includes vetted-market filtering, volume, and trade count.

The parameters that matter most

The Fetch OHLC Candles guide keeps the parameter model simple, but each field is meaningful:

  • mintAddress is required and identifies the token

  • resolution controls candle size, from 1m up to 1y

  • timeStart and timeEnd define the historical window

  • limit sets candles per page

  • page handles pagination

  • eliminateCloseToOpenGaps controls whether each candle’s open should inherit the previous close for smoother continuity

The docs say the default resolution is 1h, the default time range is roughly the last two weeks, and eliminateCloseToOpenGaps defaults to true. They also recommend explicitly setting time ranges for research or backtesting, and choosing resolutions based on the use case — short-term trading, swing analysis, or long-term trend work.

That is what makes the endpoint easy to use in products: it is simple enough for default charting, but flexible enough for historical analysis and export.

What the response gives you

The candle response is a data array where each item represents one candle. Vybe’s example includes:

  • time

  • open

  • high

  • low

  • close

  • volume

  • volumeUsd

  • count

The docs explain these fields directly: time is the candle start timestamp, OHLC fields are USD-denominated prices, volume is token volume, volumeUsd is dollar volume, and count is the number of trades in that interval.

That response shape is what makes the endpoint especially useful for charting products. You are not just getting price points. You are also getting enough context to render volume overlays, compare trading intensity across periods, or use trade count as an extra signal in analytics or backtests.

Why the candle output is cleaner than raw trade aggregation

One of the strongest points in the Fetch OHLC Candles guide is that the series is built from vetted markets only. Vybe explicitly says the dataset is designed to eliminate noise from illiquid or manipulated pools, and that it aggregates from vetted USDC, USDT, PYUSD, and wSOL markets so charts avoid fake wicks and junk liquidity.

That matters because a candle API is only as useful as the data selection behind it. Clean OHLC is not just about returning open, high, low, and close. It is about deciding which trades should count in the first place.

What this docs page gives you

The center of the article is the token candles API itself.

The Fetch OHLC Candles guide explains that GET /v4/tokens/{mintAddress}/candles returns OHLC in USD with volume and trade count, supports resolutions from 1 minute up to 1 year, accepts timeStart and timeEnd for custom windows, paginates with limit and page, and includes eliminateCloseToOpenGaps for continuity smoothing. The default resolution is 1h, the default window is the last two weeks, and the default gap-handling behavior is enabled.

That combination is what makes the endpoint useful in production. You can fetch a simple 24-candle series for a token chart, paginate through a larger backtest range, or adjust candle continuity depending on whether you want cleaner visual charts or raw exchange-style gaps. The guide also recommends setting explicit time ranges for historical work and choosing resolutions based on the product need, from short-term charts to longer-term research.

The interface starts with token context

One of the smartest things in the implementation is that the chart does not start with the chart.

It starts with token context.

In the repo, the header above the chart fetches token metadata and shows the token name, symbol, mint, decimals, price, market cap, and 24-hour volume. That metadata comes from **Token Details & Metrics **and the GET /v4/tokens/{mintAddress} endpoint. When token details are unavailable, the app falls back to symbol lookup.

That is a small product choice, but it matters. Before a user reads a candle, they already know what asset they are looking at, how big it is, and what kind of market context surrounds it.

The chart supports three candle modes

This is where the docs story gets more interesting.

Try the live demo: https://solana-ohlc-api.vybenetwork.com

The article is about Fetch OHLC Candles, but the real product workflow benefits from showing three related ways to get candles:

1. Token candles from vetted markets

This is the default, cleanest path.

Use **Fetch OHLC Candles **with GET /v4/tokens/{mintAddress}/candles when you want the best default chart for a token. Vybe aggregates across vetted USDC, USDT, PYUSD, and wSOL markets only, which helps remove fake wicks and manipulated pools from the series.

This is the mode most use-cases should start with.

2. Market candles for a single pool

Sometimes you do not want the blended token view. You want one specific market.

That is where **Fetch Markets / Pools **and the market-candles endpoint come in. The docs page for markets explains how to discover tradable markets and pool IDs, and the endpoint reference for GET /v4/markets/{marketAddress}/candles gives you OHLCV for one specific pool. This is the right mode when you want to inspect a single Raydium, Orca, Meteora, or Pump.fun market instead of the aggregated token view.

3. Candles rebuilt from historical trades

Sometimes even market candles are not enough. You want to rebuild candles from raw trade flow yourself.

That is where **Fetch Historical Trades **and GET /v4/trades come in. The repo uses the historical trades endpoint to load trades for a token or market, then rebuild OHLC client-side with additional controls like quote selection, wick filtering, and per-quote or per-market exclusions.

That is not the default mode. It is the advanced mode, and it is powerful because it lets users decide exactly what should count toward the chart.

The chart is the product surface, but the controls are what make it useful

The candlestick chart is the visual centerpiece, but the real product value comes from the controls around it.

The repo’s UI includes a remote filter panel that controls the request sent to the API: token mint or market address, candle source, resolution, start time, end time, pagination, sort order, and gap handling. When using the rebuilt-from-trades mode, it also controls how many pages of trades to fetch and whether to use authority-equals-fee-payer logic.

That matters because charting is not just about plotting candles. It is about defining what data should be plotted in the first place.

Rebuilt-from-trades is where filtering gets practical

The most distinctive part of the implementation is the rebuilt-from-trades workflow.

When the candle source switches to trades, the interface exposes controls for quote selection, number of pages to fetch, no-gaps behavior, authority-equals-fee-payer filtering, and a Filter Wicks system based on lookback trades and deviation thresholds. The repo also builds a per-quote and per-market table from the loaded trades, with include/exclude controls and bounds for price or size.

This is where the product moves beyond “show me a chart” and into “help me work with messy onchain data.”

A wick might be real. It might also be one tiny trade in a bad quote market. Rebuilding from trades lets users decide which quote tokens or markets should count, and wick filtering makes it easier to remove obvious outliers without throwing away the whole dataset. That is especially useful for memecoins, illiquid launches, or tokens trading across many fragmented venues.

The trade view makes the candles inspectable

A chart is easier to trust when you can inspect the trades behind it.

That is why the repo also shows a trades summary and a detailed trades table when using raw-trade reconstruction. The summary groups activity by program, market, and quote mint. The table lists timestamp, price, size, market, program, authority, fee payer, and signature, with links out to Solscan. Those trade rows come from **Fetch Historical Trades **and GET /v4/trades. Program names are enriched through **Labeled Wallets & Programs **and GET /v4/programs/labeled-program-accounts.

That makes the final chart much more inspectable. If a candle looks strange, the user can see exactly what trades created it.

CSV export turns it into a workflow tool

The app is not just for looking.

It is also for exporting.

The repo includes export actions for the current OHLC page and for paginated OHLC exports. In the rebuilt-from-trades mode, it exports the rebuilt candle series. In the token and market OHLC modes, it can paginate through API results and export the full candle dataset. That makes the charting UI useful for notebooks, spreadsheets, internal dashboards, and research workflows, not just browser inspection.

Why this makes a strong example for our users

The important thing is that this article is really about the Fetch OHLC Candles docs page.

The repo is here to strengthen that story, not replace it.

The guide explains the clean token-candles model: vetted markets, clean USD OHLC, multiple resolutions, time windows, and optional gap handling. The repo then shows how that model grows into a real charting product: token context at the top, a flexible chart in the middle, trade-backed inspection when needed, and export flows at the end.

That is what makes it useful as a docs-driven article. The docs define the primitives. The repo shows what those primitives become.

Final takeaway

A good OHLC API is not just a candles endpoint. It is a way to make price history usable. Vybe’s **Fetch OHLC Candles guide and GET /v4/tokens/{mintAddress}/candles endpoint give developers a clean, vetted token-candles dataset for charts, backtesting, and analytics. The related docs and endpoints for markets, historical trades, token details, and labeled programs extend that into a much richer workflow. And the solana-ohlc-api **repo shows exactly how to package those pieces into a practical product.

That is the real value here.

Not just candles, but a better way to build with them.

Further reading


Did this page help you?