I went into my first Solana charting project thinking it would take an afternoon. I just needed candles. Open, high, low, close, volume, bucketed by hour, drawn on a screen. How hard could it be?
About three days later I was staring at a spreadsheet of decoded swap events that refused to match what the DEX showed, and I finally understood that "I want a price chart" and "I have correct price data" are two very different problems with a lot of unpleasant territory between them.
If you're about to start down this road, here's what's actually waiting for you.
The plan looks simple on a whiteboard
Pull every swap for the token. Work out the price from each trade. Group the trades into time buckets. Compute OHLCV for each bucket. Draw it.
That's basically a GROUP BY over a stream of events, right? On the whiteboard, sure. Every one of those steps turns into its own little project once you start writing code.
Getting all the trades is the first wall
A token doesn't trade in one place. It might be live on Raydium, Orca, Meteora, a pump.fun bonding curve, and a couple of others at the same time. To get accurate candles you need trades from all of them, and each venue encodes its instructions differently. Decode one program's format wrong and your prices are off. Miss a venue entirely and your volume is wrong, but quietly wrong, the kind of wrong you don't notice until someone complains.
Then the decimals get you
Mints have different decimal precision. So do the assets they trade against. If you don't normalize both sides correctly, your price comes out off by a factor of a thousand or a million, and here's the cruel part: nothing crashes. The chart still renders. It just plots numbers that mean nothing, and you won't know until you compare it against a source you trust.
And the outliers make it look insane
One sandwich attack. One fat-fingered swap. One tiny manipulative trade. Any of those can produce a candle with a wick that's fifty times the real range, and suddenly your clean chart looks like a heart monitor. Anything you calculate on top of that data, moving averages, indicators, whatever, inherits the noise.
Timestamps deserve their own paragraph of warning
Slots, block times, and the Unix timestamps your charting library wants are not the same thing, and they will not convert themselves. The classic mistake is mixing milliseconds and seconds. Get that wrong and your chart either plots somewhere around the year 55,000 or down near 1970, and you'll burn a good chunk of a day before it clicks that the unit was off the whole time. I've done it. Most people who've built one of these have done it.
The part that never ends
Say you push through all of that. Congratulations, you now own an indexing pipeline, and pipelines are not "build it and walk away" things. You've got to backfill history, stay caught up with the chain in real time, patch the gaps when an RPC node drops out, and keep up with new pools and program upgrades that change instruction formats whenever they feel like it. Storage keeps growing. Queries get slower as the data piles up. And someone gets to wake up at 3am when the chart flatlines because the indexer died without telling anyone.
For most teams this is just a bad use of time. Charting almost never the thing that makes your product special. It's expected. But the machinery to do it properly can turn into one of the heaviest things you maintain, all so you can draw a line that goes up and down.
There's a much shorter path
This is the exact problem a hosted OHLCV endpoint exists to kill. Instead of rebuilding candles from raw trades, you ask for the candles you want and get back timestamped open, high, low, close, and volume, ready to drop straight into TradingView or whatever charting library you're using.
Solana Tracker's Solana OHLCV API does exactly that, and the walkthrough lines up almost point for point with the headaches above.
Picking an interval is just a parameter. You pass a type like 1m, 5m, 15m, 1h, 4h, or 1d and get bars at that resolution. No bucketing code to write, no edge cases to test. Short intervals for a scalping view, long ones for the weekly picture.
Outlier removal is already handled. There's a removeOutliers flag, so one manipulative trade doesn't wreck your candle.
The multi-pool mess is handled too. If a token trades in several pools and you want data for a specific one, you pass the pool address and get OHLCV scoped to that pool.
And the timestamp thing is spelled out instead of left as a trap. The endpoint returns time in Unix seconds, UTC, which is what TradingView expects, and the guide calls out the millisecond-versus-second mistake directly, which is genuinely the most common way these charts end up broken.
The practical difference is big. What was a multi-day indexing slog becomes one request and a small function to map the fields into your library's shape. Bound the window with time_from and time_to to keep the payload (and your credits) reasonable, map the fields, render. Done.
When you actually should build it yourself
I'm not saying never roll your own. If price data is the product, you're a data vendor, you need proprietary analytics on the raw microstructure, or you've got latency targets that an external API can't hit, then yes, owning every step is the job and you'll want that control.
For everyone else, the dashboard, the bot backtest, the token page that needs a chart, the analytics tab, the math is different. Your value is in what you do with the data, not in the plumbing that produces it. Every week you spend on an indexer to draw candlesticks is a week not spent on the thing people actually showed up for.
So before you start
Building Solana price history from scratch is one of those jobs that looks like an afternoon and eats a quarter. The hard parts, all the pools, the decimals, the outliers, the timestamps, the never-ending maintenance, stay hidden until you're already in deep. So before you open an editor and start writing a transaction indexer, it's worth asking whether you even need to own that mess. For most charting work, a Solana OHLCV API gets you to a correct chart in minutes and frees you up to spend your time on something that matters.



