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.

  1. 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.
  2. 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.
  3. 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.

Sources of chart data ranked
RankProviderScoreBest forPaid plans from
1Finnhub6.4Embeddable charting widgets$49.99/mo
2Alpaca6.1Free real-time bars, TradingView dashboard$99/mo
3Massive5.9TradingView adapter with real-time bars$23.20/mo
3Yahoo Finance5.9Free consumer charts, no official API$9.95/mo
5Barchart5.8Interactive charting on a free consumer site$8.25/mo
5EODHD5.8Deepest bar history for custom charts$16.58/mo
7TradingView5.6Best-in-class charting UI and library$12.95/mo
8Twelve Data5.2Deep OHLC history and streaming$66/mo
9Market Data5.0Cheap bars with charting-library examples$12/mo
10Databento4.5Nanosecond tick-level bars for custom charts$199/mo
11Alpha Vantage4.2Deep bar history via REST$41.58/mo

The five highest-ranked sources, side by side:

The leading sources of chart data compared
FeatureFinnhubAlpacaMassiveBarchartTradingView
ChartingEmbeddable iframe widgets 1TradingView on dashboard, no API 2No widget; open-source TV adapter 3Yes, site + chart-image endpoint 4Yes, the core product 5
Real-time US stocksReal-time via websocket (US SIP) 6Free: IEX only. Paid: full-SIP 7Real-time from Advanced ($199/mo) 8Real-time or delayed, by package 9Delayed by default, paid add-on 10
Stock price historyPremium; bulk data from 1994 67+ yrs (pages disagree on start) 112yr free; 20+yr (to 2003) Advanced+ 8Not published 95,000-40,000 bars, not calendar 10
WebSocket streamingYes (trades, news, press releases) 12Yes, both tiers 11Yes 13Yes 14Not published (internal only)
Official SDKsPython, Go, JS, Ruby, Kotlin, PHP 12Python, JS, Go, C#, Java 15Python, JS/TS, Go, Java/Kotlin 3Python, JS, Java, PHP, Go 16None (no data API to wrap) 17
Free tierUndocumented; ~60 calls/min (3rd-party) 18Yes, IEX equities + indicative options 115 calls/min, 2yr history, EOD only 8Free account, limited screeners 4Yes, 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 + optionsNot offered 6$99/mo 11$318.4/mo (annual) 8Price not published, partial 14Not offered 10
Cost of real-time US stocks, APIFree 6Free 11$159.2/mo (annual) 8Price not published 9Not offered 10
Cost of real-time US options, APINot offered 6$99/mo 11$159.2/mo (annual) 13Price not published, partial 9Not offered 20
Sources for this table, checked 2026-09-26
  1. widget.finnhub.io/widgets/stocks/chart?symbol=AAPL
  2. alpaca.markets/
  3. github.com/massive-com
  4. barchart.com/get-barchart-premier
  5. tradingview.com/HTML5-stock-forex-bitcoin-charting-library/
  6. finnhub.io/static/swagger.json
  7. alpaca.markets/support/data-provider-alpaca
  8. massive.com/pricing
  9. barchart.com/ondemand/api
  10. tradingview.com/pricing/
  11. alpaca.markets/data
  12. finnhub.io/docs/api
  13. massive.com/pricing?product=options
  14. barchart.com/ondemand
  15. github.com/alpacahq
  16. github.com/barchart
  17. github.com/tradingview
  18. apicostcalc.com/finnhub.html
  19. finnhub.io/pricing
  20. 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.