TradingView has no public TradingView API for market data: you cannot request quotes or price history from it for your own app. What it offers developers is charting, as free widgets and two charting libraries, plus a REST API for brokers. Every one of those needs your own data feed. Below, we rank 11 sources of chart data, TradingView among them.
About 1,900 people a month search for a TradingView API, and most of them want price data. The answer on this page is the one we give in support: pick a data provider, then draw it with a TradingView library or any other.
What does the TradingView API offer developers?
TradingView sells three things to developers, and none of them is a data feed.
- Widgets: free embeddable charts and screeners, carrying TradingView’s branding and TradingView’s own data. You can place them on a page but not read their data.
- Lightweight Charts: a free, open-source charting library under the Apache 2.0 license, at version 5.2.1 with about 17,400 GitHub stars. It draws candles and lines from data you give it.
- Advanced Charts: the full TradingView charting library, free to license for approved companies building a public product. You connect your own feed through its Datafeed API.
TradingView’s published REST API is for brokers who want their trading accounts to work inside TradingView. It does not serve quotes or history to third parties. Pine Script runs inside TradingView’s own charts and cannot export data.
How do you feed data into Lightweight Charts?
Lightweight Charts takes an array of bars, each with a time, an open, a high, a low and a close, and draws them. You fetch the bars from a data API, map the fields, and call setData. For a live chart, you add each new bar or tick with update. The Lightweight Charts documentation shows both calls.
A data API with a WebSocket can push live bars; a REST-only API has to be polled. That difference decides how live the chart looks. Our API is REST only, so a live chart built on it polls, and our May 2026 release shipped runnable examples for Lightweight Charts, Apache ECharts, Chart.js, Plotly and Highcharts Stock, listed in the May 2026 changelog.
Which data sources work best for charts?
Each source was scored from 0 to 10 on five criteria, from the charts it offers to how easily it feeds TradingView’s libraries. Charts and OHLC bars through an API count double.
| Rank | Provider | Score | Best for | Paid plans from |
|---|---|---|---|---|
| 1 | Finnhub | 6.4 | Embeddable charting widgets | $49.99/mo |
| 2 | Alpaca | 6.1 | Free real-time bars, TradingView dashboard | $99/mo |
| 3 | Massive | 5.9 | TradingView adapter with real-time bars | $23.20/mo |
| 3 | Yahoo Finance | 5.9 | Free consumer charts, no official API | $9.95/mo |
| 5 | Barchart | 5.8 | Interactive charting on a free consumer site | $8.25/mo |
| 5 | EODHD | 5.8 | Deepest bar history for custom charts | $16.58/mo |
| 7 | TradingView | 5.6 | Best-in-class charting UI and library | $12.95/mo |
| 8 | Twelve Data | 5.2 | Deep OHLC history and streaming | $66/mo |
| 9 | Market Data | 5.0 | Cheap bars with charting-library examples | $12/mo |
| 10 | Databento | 4.5 | Nanosecond tick-level bars for custom charts | $199/mo |
| 11 | Alpha Vantage | 4.2 | Deep bar history via REST | $41.58/mo |
The five highest-ranked sources, side by side:
| Feature | Finnhub | Alpaca | Massive | Barchart | TradingView |
|---|---|---|---|---|---|
| Charting | Embeddable iframe widgets 1 | TradingView on dashboard, no API 2 | No widget; open-source TV adapter 3 | Yes, site + chart-image endpoint 4 | Yes, the core product 5 |
| Real-time US stocks | Real-time via websocket (US SIP) 6 | Free: IEX only. Paid: full-SIP 7 | Real-time from Advanced ($199/mo) 8 | Real-time or delayed, by package 9 | Delayed by default, paid add-on 10 |
| Stock price history | Premium; bulk data from 1994 6 | 7+ yrs (pages disagree on start) 11 | 2yr free; 20+yr (to 2003) Advanced+ 8 | Not published 9 | 5,000-40,000 bars, not calendar 10 |
| WebSocket streaming | Yes (trades, news, press releases) 12 | Yes, both tiers 11 | Yes 13 | Yes 14 | Not published (internal only) |
| Official SDKs | Python, Go, JS, Ruby, Kotlin, PHP 12 | Python, JS, Go, C#, Java 15 | Python, JS/TS, Go, Java/Kotlin 3 | Python, JS, Java, PHP, Go 16 | None (no data API to wrap) 17 |
| Free tier | Undocumented; ~60 calls/min (3rd-party) 18 | Yes, IEX equities + indicative options 11 | 5 calls/min, 2yr history, EOD only 8 | Free account, limited screeners 4 | Yes, 1 chart, 5,000 bars 10 |
| Cheapest paid plan | $49.99/mo (marketdata-basic) 19 | $99/mo (Algo Trader Plus) 11 | $23.20/mo (Stocks Starter, annual) 8 | $8.25/mo (Plus, annual) 4 | $12.95/mo (Essential) 10 |
| Cost of real-time stocks + options | Not offered 6 | $99/mo 11 | $318.4/mo (annual) 8 | Price not published, partial 14 | Not offered 10 |
| Cost of real-time US stocks, API | Free 6 | Free 11 | $159.2/mo (annual) 8 | Price not published 9 | Not offered 10 |
| Cost of real-time US options, API | Not offered 6 | $99/mo 11 | $159.2/mo (annual) 13 | Price not published, partial 9 | Not offered 20 |
Sources for this table, checked 2026-09-26
- widget.finnhub.io/widgets/stocks/chart?symbol=AAPL
- alpaca.markets/
- github.com/massive-com
- barchart.com/get-barchart-premier
- tradingview.com/HTML5-stock-forex-bitcoin-charting-library/
- finnhub.io/static/swagger.json
- alpaca.markets/support/data-provider-alpaca
- massive.com/pricing
- barchart.com/ondemand/api
- tradingview.com/pricing/
- alpaca.markets/data
- finnhub.io/docs/api
- massive.com/pricing?product=options
- barchart.com/ondemand
- github.com/alpacahq
- github.com/barchart
- github.com/tradingview
- apicostcalc.com/finnhub.html
- finnhub.io/pricing
- tradingview.com/features/
Finnhub
6.4/10 Embeddable iframe charting widgets plus bulk history back to 1994.
- Charts you can use ×2
- 6/10
- OHLC bars for your own charts ×2
- 8/10
- Live updates ×1.5
- 7/10
- Fits TradingView's libraries ×1
- 5/10
- Price ×1.5
- 5/10
Strengths
- Embeddable iframe charting widgets, no build required
- Bulk data back to 1994
- Real-time via websocket (US SIP)
Weaknesses
- No published free-tier limit
- 1.5/5 on SourceForge and Slashdot
Finnhub ranks first because it offers both halves: embeddable chart widgets and an API with bulk history back to 1994 and real-time trades over WebSocket. It publishes no free-tier limit on its own pricing page.
Alpaca
6.1/10 TradingView is already wired into its dashboard, plus free real-time IEX bars via websocket.
- Charts you can use ×2
- 4/10
- OHLC bars for your own charts ×2
- 6/10
- Live updates ×1.5
- 8/10
- Fits TradingView's libraries ×1
- 6/10
- Price ×1.5
- 7/10
Strengths
- TradingView integration on the brokerage dashboard
- Free real-time IEX bars via websocket
- JS/TS SDK for wiring into a custom chart
Weaknesses
- No public chart widget or embed of its own
- History only 7+ years (pages disagree)
Alpaca streams free real-time IEX bars over WebSocket, and its brokerage dashboard already uses TradingView charts. The full consolidated feed costs $99 a month, and an account is needed.
Massive
5.9/10 An open-source TradingView adapter and real-time websocket bars, but real-time costs $199/month.
- Charts you can use ×2
- 3/10
- OHLC bars for your own charts ×2
- 9/10
- Live updates ×1.5
- 6/10
- Fits TradingView's libraries ×1
- 8/10
- Price ×1.5
- 4/10
Strengths
- Open-source TradingView adapter (1,500+ stars)
- 20+ years of bars via REST/WebSocket
- Real-time from $199/mo
Weaknesses
- No native chart widget of its own
- Trustpilot 2.3/5 (6 reviews)
Massive maintains an open-source adapter between its API and TradingView’s charting library, which saves the most integration work of any source here. Real-time bars start on the $199 Advanced plan.
TradingView
5.6/10 The dominant charting platform and the free Lightweight Charts library, but no market-data API to pull bars from.
- Charts you can use ×2
- 10/10
- OHLC bars for your own charts ×2
- 0/10
- Live updates ×1.5
- 3/10
- Fits TradingView's libraries ×1
- 10/10
- Price ×1.5
- 7/10
Strengths
- Free, open-source Lightweight Charts library
- Dominant retail charting platform, App Store 4.8/5 (413,000 reviews)
- $12.95/mo Essential is cheap for the UI
Weaknesses
- No public REST/WebSocket market-data API for developers
- A developer must bring their own data feed underneath it
TradingView scores 10 for charts and 0 for bars, which is the whole point of this page. Its paid plans, from $12.95 a month, buy the charting platform for your own use. Real-time exchange data is an extra add-on per exchange.
Market Data
5.0/10 Ships runnable examples for five charting libraries including Lightweight Charts, but no live streaming and no widget of its own.
- Charts you can use ×2
- 2/10
- OHLC bars for your own charts ×2
- 6/10
- Live updates ×1.5
- 3/10
- Fits TradingView's libraries ×1
- 6/10
- Price ×1.5
- 9/10
Strengths
- Runnable example integrations for Lightweight Charts, ECharts, Chart.js, Plotly, and Highcharts Stock
- Cheap $12/mo Starter for real-time stock bars
Weaknesses
- No native chart widget or embed of its own
- No websocket, REST/poll-only, so no true live-updating feed
We rank ninth. Our bars are cheap, with a real-time stock price from $12 a month billed annually, but we have no chart widget and no WebSocket, so a live chart has to poll. One more thing trips people up: a TradingView ticker format does not mean we cover that exchange. We cover US markets only, and we have said so to developers every year since 2022.
Why can’t our API run from serverless functions?
Because the exchanges classify our product as a controlled platform only while one customer device at a time reads the data. Serverless platforms send requests from rotating egress IPs, which breaks that promise, so we allow no IP allowlists or exemptions.
A paying customer asked us for an allowlist in July 2026, for a personal portfolio monitor on edge functions. We said no, and gave him the only alternative the exchanges allow: uncontrolled access with no IP limit, which means historical data only, with every intraday and real-time price switched off.
Why do we refer commercial use of chart data to a partner?
We stopped selling to business customers ourselves in February 2025, when IEX ended free redistribution of real-time stock prices for business use. From then on, every business plan carried exchange fees per customer and compliance work our small team could not carry.
So we refer commercial buyers to our partner Intrinio. Between 1 and 25 September 2026 we sent it 22 commercial enquiries, about one a day. The test we apply is display: if other people see the prices, or scores built from them, the use is commercial.
Which source should you use with a TradingView chart?
For a free prototype, use Alpaca’s IEX bars. For a live US chart, Alpaca or Massive, both over WebSocket. For deep daily history, EODHD at more than 40 years. For US options charts, ours: the options chain API returns every contract’s price and greeks. The ranking of financial data providers compares every source on more than charts.
