The Solana TradingView Chart API guide: resolve tokens, seed up to 5,000 OHLCV candles, backfill on scroll, and keep the live bar fresh with Birdeye Data.
July 3, 2026

Most Solana charts break at the data layer, not the UI. The candlestick widget renders fine, but candles arrive out of order, history stops loading when the user scrolls back, and the last bar freezes because the live feed quietly dropped. The hard part of a Solana TradingView Chart API integration is the feed, not the chart.
This guide builds the Solana TradingView Chart data layer with Birdeye Data: a multi chain market data service covering real time prices, OHLCV (open, high, low, close, volume) candles, liquidity, and trade activity across Solana and major EVM networks. A Solana TradingView Chart needs four different shapes of data, and the whole pipeline runs on a handful of endpoints. Birdeye even publishes an official TradingView datafeed example at github.com/birdeye-so/tradingview-example-js-api, so the approach below is the same one their reference implementation uses.
The trick is to fetch only what is on screen: stream or poll the visible candle, and pull older history only when the user scrolls back. That keeps credit usage flat as chart traffic grows.
To build a Solana TradingView chart with Birdeye Data, you need four data layers: resolve, seed, backfill, and live.

GET /defi/v3/search to resolve a symbol or address to a token or pool, and GET /defi/v3/price/stats/single for the toolbar price, high/low, and percentage change.GET /defi/v3/ohlcv to seed the visible viewport with up to 5,000 candles, including second level 1s, 15s, and 30s intervals on Solana.GET /defi/v3/ohlcv by shifting the time window to backfill older candles on scroll, and fall back to GET /defi/history_price for very long line chart ranges.SUBSCRIBE_PRICE over WebSocket (Premium package and up). Optionally overlay liquidity with GET /defi/v3/liquidity/ohlc/pair.All requests share the base URL https://public-api.birdeye.so, authenticate with the X-API-KEY header, and select the network with the x-chain header (default solana). The chart in this guide is Solana, so every header is x-chain: solana.
One access note before you wire up the live layer: REST polling drives the live candle on every tier and is the primary path in this guide. WebSocket streaming is the lower latency option, available from the Premium package up per the Data Accessibility table, which Stage 4 covers in full.
Endpoint: GET /defi/v3/search, GET /defi/v3/price/stats/single
Chains: All supported networks
Docs: Token – Search, Price Stats – Single
When a user types BONK or pastes a mint, you need a canonical address before you can request anything else. Search resolves both: it returns token results and market (pool) results in one call, so you can chart either an aggregated token or one specific pool.
Key parameters for search:
| Parameter | Required | Notes |
|---|---|---|
keyword | No | Symbol, name, or address |
chain | No | solana (default all) |
target | No | token, market, or all |
search_by | No | symbol, name, address, combination |
search_mode | No | exact or fuzzy |
sort_by | Yes | e.g. volume_24h_usd, liquidity |
sort_type | Yes | desc or asc |
limit | No | 1 to 20 |
curl --request GET \
--url '<https://public-api.birdeye.so/defi/v3/search?chain=solana&keyword=BONK&target=token&search_by=symbol&search_mode=exact&sort_by=volume_24h_usd&sort_type=desc&offset=0&limit=20>' \
--header 'accept: application/json' \
--header 'x-chain: solana' \
--header 'X-API-KEY: YOUR_API_KEY'
A common 400: sort_by and sort_type are both required, not optional. Forget either one and the call fails. The response groups results by type, so read data.items[], find the group where type is token, and take result[0].address. Market groups carry the pool address you will pass to the pool level OHLCV and the liquidity overlay later.
For the toolbar, price/stats/single returns price, percentage change, and high/low across one or more windows in a single call. Pass the windows you display as a comma separated list_timeframe.
curl --request GET \
--url '<https://public-api.birdeye.so/defi/v3/price/stats/single?address=DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263&list_timeframe=1h,24h>' \
--header 'accept: application/json' \
--header 'x-chain: solana' \
--header 'X-API-KEY: YOUR_API_KEY'
One schema gotcha for later: on Solana the stats payload is a direct array under data, while on EVM chains the same endpoint nests results under data.items. If you plan to extend the chart to EVM, branch your parser on chain now.
Now you have a canonical address and toolbar stats for your Solana TradingView Chart. Next, fill the visible chart.
Endpoint: GET /defi/v3/ohlcv (token), GET /defi/v3/ohlcv/pair (pool)
Chains: Solana, Base, BSC, Ethereum, Monad
Docs: OHLCV (V3)
The first paint should fill the visible viewport in one request. The V3 OHLCV endpoint returns up to 5,000 records, supports second level Solana intervals, and does not pad missing candles by default, which is exactly what a TradingView datafeed expects from its history call.
Key parameters:
| Parameter | Required | Notes |
|---|---|---|
address | Yes | Token address |
type | Yes | 1s,15s,30s,1m,3m,5m,15m,30m,1H,2H,4H,6H,8H,12H,1D,3D,1W,1M |
currency | No | usd or native |
time_from | Yes | Unix seconds |
time_to | Yes | Unix seconds |
mode | No | range or count |
count_limit | No | 0 to 5,000, used with mode=count |
padding | No | Default false |
outlier | No | Default true |
curl --request GET \
--url '<https://public-api.birdeye.so/defi/v3/ohlcv?address=DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263&type=15m¤cy=usd&time_from=1726700000&time_to=1726704000&mode=range&padding=false>' \
--header 'accept: application/json' \
--header 'x-chain: solana' \
--header 'X-API-KEY: YOUR_API_KEY'
Each item in data.items[] carries o, h, l, c, v, v_usd, and unix_time, which maps one to one onto a TradingView bar object. To chart a specific pool rather than an aggregated token, call /defi/v3/ohlcv/pair with the pool address. It takes the same time and type params, drops currency, and adds inversion to flip the base and quote sides.
With the viewport filled, handle the user scrolling back into history.
Endpoint: GET /defi/v3/ohlcv, GET /defi/history_price
Chains: All supported networks
Docs: Price – Historical
When the user pans left, request an older window by shifting time_from and time_to to the period just before your earliest loaded candle, keeping the same type so the series stays continuous. TradingView calls your datafeed repeatedly as the user scrolls, so this is just the same OHLCV call with an earlier window.
For very long ranges where a candle by candle load is wasteful, fall back to history_price, which returns a lightweight line series of unixTime and value points. It takes address, address_type (token or pair), type, time_from, and time_to.
curl --request GET \
--url '<https://public-api.birdeye.so/defi/history_price?address=DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263&address_type=token&type=15m&time_from=1726600000&time_to=1726700000>' \
--header 'accept: application/json' \
--header 'x-chain: solana' \
--header 'X-API-KEY: YOUR_API_KEY'
Second level candles have limited retention: 1s is kept for 2 weeks, and 15s and 30s for 3 months. Cap the second level intervals to recent ranges in your UI, and switch to 1m and above for anything deeper, or backfill requests will come back empty.
This is the layer that makes your Solana TradingView Chart feel real time, and it is the one place where your package tier changes the implementation.
Request the latest one or two candles on a short interval with mode=count, then merge the newest bar into the chart. This works on every paid tier, Standard through Enterprise, with no WebSocket.
curl --request GET \
--url '<https://public-api.birdeye.so/defi/v3/ohlcv?address=DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263&type=1m¤cy=usd&mode=count&count_limit=2&time_to=1726704000>' \
--header 'accept: application/json' \
--header 'x-chain: solana' \
--header 'X-API-KEY: YOUR_API_KEY'
A poll interval close to the candle interval is usually enough. For a 1m chart, polling every few seconds keeps the forming bar fresh without wasting credits. Watch your budget with the credits endpoint in the next section and back off the interval if needed.
Endpoint: SUBSCRIBE_PRICE, SUBSCRIBE_TXS
Plan availability: Premium, Business, and Enterprise per the Data Accessibility table. Note: the WebSocket docs page still lists Business and up, so the two pages conflict. Confirm streaming access against your own key before relying on it.
Docs: WebSocket – Price/OHLCV
For the lowest latency live bar, open one socket and subscribe to the price stream. The chain goes in the URL path, not a header.
const ws = new WebSocket(
`wss://public-api.birdeye.so/socket/solana?x-api-key=${API_KEY}`,
"echo-protocol"
);
ws.onopen = () => {
ws.send(JSON.stringify({
type: "SUBSCRIBE_PRICE",
data: {
queryType: "simple",
chartType: "1m",
address: "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
currency: "usd",
mode: "raw"
}
}));
};
ws.onmessage = (event) => {
const msg = JSON.parse(event.data);
if (msg.type === "PRICE_DATA") {
// msg.data: { eventType: "ohlcv", o, h, l, c, v, unixTime, symbol, address }
updateLastCandle(msg.data);
}
};
Three things that bite people on the socket:
SUBSCRIBE_PRICE overwrites the previous one. To follow several tokens, send a single complex query with all of them (up to 100) and resend the full list whenever it changes. Because the limit is per type, you can run SUBSCRIBE_PRICE and SUBSCRIBE_TXS on the same socket at once.Origin and Sec-WebSocket-Protocol: echo-protocol values are set for you. In Node, set them explicitly on the client.To add a trade tape or volume markers, subscribe to SUBSCRIBE_TXS, which returns TXS_DATA events carrying blockUnixTime, owner, source, and txHash.
Endpoint: GET /defi/v3/liquidity/ohlc/pair
Chains: Solana only
Docs: Liquidity OHLC – Pair
Most charts stop at price. A liquidity ribbon under the candles is a feature competitors rarely expose, and it is one call. This endpoint returns liquidity as OHLC for a Solana pool, up to 100 records per request, anchored at a timestamp and paged by direction rather than a time_from/time_to range.
curl --request GET \
--url '<https://public-api.birdeye.so/defi/v3/liquidity/ohlc/pair?address=YOUR_PAIR_ADDRESS&time=1726704000&direction=back&count=100>' \
--header 'accept: application/json' \
--header 'x-chain: solana' \
--header 'X-API-KEY: YOUR_API_KEY'
Each item carries the open, high, low, and close liquidity in USD for the window. To page older liquidity candles, set direction=back and move the time anchor to just before your earliest loaded candle; use direction=forward to move toward the present. With time omitted, the anchor defaults to the latest available candle.
Endpoint: GET /utils/v1/credits
Docs: Utils – Credits Usage
If you poll for the live layer, wire this in from day one so a tight interval does not quietly burn your budget.
curl --request GET \
--url '<https://public-api.birdeye.so/utils/v1/credits>' \
--header 'X-API-KEY: YOUR_API_KEY'
With no parameters it returns the current cycle: total usage split into REST api and WebSocket ws, remaining credits, and overage fields. A practical pattern: poll hourly and widen your live poll interval automatically if remaining credits drop below a safe threshold, rather than running into a 429 mid session.

For your Solana TradingView Chart, build it in that order: paint the visible viewport first, attach the live layer last, and backfill only when the user scrolls. On any tier the live layer can be a short interval poll of the latest OHLCV candle. From Premium up you can swap that one function for a SUBSCRIBE_PRICE socket with ping pong and reconnect, and leave everything else as is.
Checklist before you ship your Solana TradingView Chart:
padding=false so the chart does not invent flat candles.type, and second level intervals are capped to their retention windows.The V3 OHLCV endpoint covers 1s through 1M, including the second level 1s, 15s, and 30s intervals on Solana that most competitors do not offer.
Up to 5,000 records per OHLCV V3 call. For more history, page by shifting the time window.
Minute and higher intervals reach far back. Second level intervals are limited: 1s for 2 weeks, 15s and 30s for 3 months.
No. REST polling of the latest OHLCV candle keeps the chart live on every paid tier and is the primary path here. WebSocket streaming is available from the Premium package up per the Data Accessibility table, as a lower latency option.
Use /defi/v3/ohlcv/pair with the pool address, and set inversion if you need to flip base and quote.
They fell outside the retention window. Switch to 1m or higher for ranges beyond the second level limits above.
You now have the full Solana TradingView Chart data layer, from first paint to live candle. Get an API key at Birdeye Data to start building, and keep the full endpoint reference handy. To skip the boilerplate, start from the official TradingView datafeed example at github.com/birdeye-so/tradingview-example-js-api.
Birdeye provides expansive data covering tokens, wallets, trades, and protocols across 300+ exchanges on 10 chains.
Whether you’re a solo tinkerer or a large team looking to scale, Birdeye offers plans that caters for your data needs and budget.
Dive into our docs and start querying data on 60+ APIs and 8 WebSocket types today!
Insights is a feature that allows users to analyze market trends in various aspects and dive deep into many industry sectors.
Find Gems is a feature that helps user identify potential Tokens at the current time.
Launch Explorer is a feature that enables users to access real-time data of tokens on popular launchpads like pump.fun, letsbonk.fun,...
New insight article by Birdeye reveals USDC's breakout growth in recent years
Data by Birdeye shows total trading volume of xStocks, PreStocks, and Ondo Global Markets on Solana peaked in March 2026
After the Drift Protocol's hack, Solana Foundation initiated programs such as STRIDE and SIRIN to tighten security for ecosystem teams
July 3, 2026
July 3, 2026
July 3, 2026