Charting

TradingView Data Export Explained

Learn how TradingView's CSV export works, why there is no data API, and what to use instead for programmatic or recurring market data needs.

Tom Hartman

Marketing

10 Min Read Reviewed by Mike Christensen Fact-checked by Mike Christensen
BluSky — The Future of Trading. Prop firm futures trading. Sign up at BluSky.pro.

TradingView data export works differently from what most traders expect when they first go looking for it. The CSV download on your chart is a manual snapshot of whatever data is currently loaded, not a live feed or a programmable endpoint. If you need automated or recurring market data, you will need a different tool entirely, and understanding that distinction up front saves a lot of wasted effort.

This article covers exactly what the TradingView data export does and does not do, why there is no public data API, and what your realistic options are when you need programmatic access to OHLC data, indicator output, or trade signals. The right answer depends on what you are actually trying to accomplish, and the sections below map each use case to the correct tool.

What the CSV Export Actually Does

Export reflects chart state

The CSV download contains the data currently loaded on your chart, including OHLC values and any indicator columns visible at export time.1 It is a manual snapshot: it captures the chart at a moment in time rather than streaming anything. Chart data export is available on paid plans starting at the Essential tier.2

How to load more history first

TradingView's support documentation states this directly: the data you export is what your chart shows you, so you must scroll the chart left or drag the x-axis before downloading to capture additional historical bars.1 The maximum number of historical bars available depends on your plan. Essential and Plus plans include 10K bars, Premium includes 20K bars, and Ultimate includes 40K bars.2

Minute-level history is subject to separate limits. Essential plans include 180 days of minute history and Plus plans include 365 days. Premium and Ultimate plans unlock all available minute history.2 If you need a deep intraday dataset, your plan tier sets the ceiling before you even start scrolling.

What the file contains

The downloaded file is a standard CSV you can open in any spreadsheet application for further analysis.1 Any indicator plotted on your chart at the time of export appears as additional columns alongside the OHLC data. This means you can capture custom Pine Script output without any extra tooling, provided a static snapshot is sufficient for your purpose.

Why There Is No TradingView Data API

The official position

TradingView's own support documentation states plainly: "We don't have an API that gives access to data as of now, but we are planning to add it in the future."3 The REST API TradingView does operate is aimed at brokers integrating with their trading platform, not at traders or developers trying to pull market data programmatically.3

Implications for automation

Without a data API, TradingView cannot serve as a programmatic data source for backtesting pipelines, quantitative research workflows, or any application that needs to fetch OHLC or indicator data on a schedule. The CSV export fills a one-off need but cannot substitute for a data feed: it requires manual interaction every time you want updated data. Traders who build dashboards or populate databases from market data need an alternative source entirely.

Alternative 1: Your Broker's API

When broker data is enough

Most retail brokers expose REST or WebSocket APIs that return OHLC bars, quotes, and account data for instruments you are authorized to trade. Broker APIs are well-documented, subject to formal support, and do not depend on private endpoints that can disappear without notice. If your strategy already routes orders through a broker, that same connection often gives you access to the historical and real-time data you need without an extra subscription.

Limitations to expect

Broker APIs typically cover only the asset classes and exchanges the broker supports. A US equities broker may not supply crypto or futures data, and rate limits and history depth vary considerably between brokers and account tiers. Some brokers also restrict API access to funded live accounts, which makes building and testing paper-trading data pipelines more difficult.

Alternative 2: A Dedicated Market Data Provider

Purpose-built data APIs

Providers such as Polygon.io, Alpaca Data API, and similar services offer REST and WebSocket endpoints specifically designed for programmatic market data consumption. These services typically offer deeper history, broader asset class coverage, and higher rate limits than broker APIs. Unlike TradingView, dedicated data providers issue formal API keys, version their endpoints, and publish breaking-change policies, which matters when you are building something you depend on.

Evaluating a provider

Before committing to a provider, check which exchanges are covered, especially if you trade futures, crypto, or international instruments. Confirm the history depth available at your required resolution: tick, second, and minute data often have shorter retention windows than daily data. Review the free tier limits carefully, as many providers throttle heavily on free plans and charge separately for real-time versus delayed data.

Alternative 3: Alert Webhooks for Signals

Webhooks send signals, not data

TradingView's supported webhook feature fires an HTTP POST request to a URL you specify the moment an alert condition is triggered, with the alert message in the request body.4 This is the correct path when you need to act on a TradingView signal: you receive the event immediately without polling or exporting anything. TradingView's documentation notes that if the alert message is valid JSON, the request includes an application/json content-type header, making it straightforward to parse on the receiving end.4

Routing webhooks to a broker

TradingView webhooks only accept destinations on ports 80 and 443, and the remote server must respond within three seconds or the request is cancelled.4 Webhook delivery also requires two-factor authentication to be enabled on your TradingView account.4 TradersPost receives these webhooks and routes the signal as a trade order to your connected broker, translating the JSON payload into the correct order type and parameters without requiring any data export or manual intervention on your part.

TradingView's Lightweight Charts Library

What it is and is not

TradingView publishes an open-source JavaScript library called Lightweight Charts on GitHub under the Apache 2.0 license, for rendering financial charts in a browser.5 The library is a charting renderer: you supply the data, and it displays it. It does not fetch or provide market data itself. Lightweight Charts is the right tool if you are building a web interface that visualizes data you already have from another source, not a substitute for a data API.

Scope of the library

The library supports line series, candlestick series, and custom plugin types, and can be extended with community plugins.5 It carries an attribution requirement: the TradingView name and a link to tradingview.com must appear on any page that uses it, per the NOTICE file in the repository.5 Installing via npm is the standard path; a standalone CDN build via unpkg is also available for environments that cannot use a module bundler.5

What to Avoid: Unofficial Scraping

Why private endpoint libraries break

Several open-source projects attempt to extract TradingView data by calling private internal endpoints that are not documented or supported. TradingView does not publish or version these endpoints, so they can change or disappear at any time without notice, breaking any code that depends on them. Building a production system on unofficial scraping means accepting the risk of silent failures whenever TradingView updates its internal infrastructure.

Terms of service and reliability

Automated access to undocumented endpoints likely conflicts with TradingView's terms of use, creating both legal exposure and account-suspension risk. Even when scraping appears to work, data quality is unverifiable: missing bars, delayed updates, and partial responses are common failure modes. A dedicated market data provider or broker API gives you a documented SLA and a support channel when things go wrong; a scraping library gives you neither.

Choosing the Right Approach

Match the tool to the need

If you need a one-time data pull for offline analysis or backtesting, the CSV export is the simplest path: scroll back to load history, then download. If you need recurring or automated market data, use a dedicated data provider or your broker's API. Neither requires TradingView. If you need to act on a TradingView chart signal automatically, alert webhooks are the supported mechanism and require no data export at all.

Decision criteria summary

  • One-off analysis: CSV export on any paid TradingView plan, after scrolling back to load the history you need.
  • Programmatic or scheduled data: broker API or a dedicated market data provider with versioned endpoints.
  • Automated trading on chart signals: TradingView alert webhook connected to an order routing layer.
  • Web chart rendering with your own data: TradingView's open-source Lightweight Charts library.

Bottom Line

  • The TradingView CSV export downloads whatever data is loaded on your chart at that moment, including indicator values, so scroll back before you export to maximize history.1
  • TradingView has no public data API. Its REST API is for broker integrations, not for pulling market data programmatically.3
  • For recurring or automated data access, use a dedicated market data provider or your broker's own API.
  • If you want to act on chart signals rather than export data, TradingView's alert webhook is the correct and supported mechanism.4
  • Unofficial scraping libraries depend on private endpoints that can break without warning and likely violate TradingView's terms of use.

Frequently Asked Questions

Does TradingView have a public data API?

No. TradingView's support documentation states that no public data API exists as of now, though one is planned for the future.3 The REST API TradingView operates is for brokers integrating with the trading platform, not for pulling market data programmatically.3 For programmatic data access, use a dedicated market data provider or your broker's own API instead.

How do I get more historical data in a TradingView CSV export?

TradingView's documentation states that the export contains only the data currently loaded on your chart, so you must scroll left or drag the x-axis to load more history before downloading.1 The maximum bars available depend on your plan: 10K on Essential and Plus, 20K on Premium, and 40K on Ultimate.2 Minute-level history is limited to 180 days on Essential and 365 days on Plus; Premium and Ultimate plans unlock all available minute history.2

Can I export indicator values alongside price data?

Yes. TradingView's support documentation confirms that the CSV export includes tickers and indicator values, not just raw OHLC data.1 Any indicator plotted on the chart at the time of export will appear as columns in the downloaded file. This makes the export useful for capturing custom Pine Script indicator output without additional tooling, as long as you only need a static snapshot.

Is it safe to use an unofficial TradingView scraping library?

These libraries rely on private internal endpoints that TradingView does not document or version, so they can break without notice when TradingView updates its infrastructure. Automated access to undocumented endpoints likely conflicts with TradingView's terms of use and creates account-suspension risk. A documented broker API or market data provider is a more reliable foundation for any system you depend on.

What is TradingView Lightweight Charts and does it provide market data?

Lightweight Charts is an open-source JavaScript library published by TradingView on GitHub for rendering interactive financial charts in a browser.5 It is a rendering library only: it displays data you supply but does not fetch or stream market data itself.5 It is useful for building custom web interfaces that visualize data from your own source, not as a substitute for a market data API.

References

1 TradingView Support: How to export chart data
2 TradingView Pricing
3 TradingView Support: I need access to your API in order to get data or indicator values
4 TradingView Support: How to configure webhook alerts
5 TradingView Lightweight Charts on GitHub

All In Charting
  • Charting Sep 16, 2026

    TradingView Remix vs Pine Script: When to Use Each

    Remix writes Pine Script for you. Learn when to describe your strategy in English, when to code it yourself, and how to validate what Remix produces.

  • Charting Sep 16, 2026

    The TradingView Remix Extension Explained

    TradingView Remix is an AI chart copilot browser extension. Learn what it does, who built it, what it accesses, and how to install it safely.

  • Charting Sep 16, 2026

    TradingView Remix: What It Is

    TradingView Remix is the official AI Chart Copilot browser extension. Learn what it does, what it cannot do, usage limits, and how to get started.

  • Charting Sep 16, 2026

    The TradingView API: What Exists and What Does Not

    TradingView has no public REST API for data or trades. Here is exactly what TradingView does publish, what is missing, and what actually works instead.

Start trading at scale today. Sign up for free.

Free 7-day trial

Set-up in 3 minutes

Paper account for testing

TradersPost operates as a non-custodial automated trading platform, enabling users to connect alerts from their preferred trading platforms to their selected brokerage or exchange accounts. It abstains from the transmission, custody, or management of customer funds, covering both traditional and cryptocurrency assets. Typically, registration requirements set by regulatory entities such as the SEC, FINRA, or FinCEN apply to entities that hold or transmit customer funds. To ensure ongoing compliance, TradersPost regularly engages with regulatory authorities to confirm its adherence to all relevant local and federal laws.

TradersPost does not provide alerts, signals, research, analysis, or trading advice of any kind. It is designed to assist traders and investors in making their own trading decisions based on their alerts. The platform does not offer recommendations regarding securities to buy or sell, nor does it provide trading or investing advice. The platform and its features, capabilities, and tools are provided 'as-is' without any warranty.

Risk Disclosure: The use of automated trading systems involves inherent risks, including the potential for significant financial loss. These systems operate based on predetermined algorithms that may not fully adapt to changing market conditions, possibly making them unsuitable for some investors. Individuals are advised to thoroughly assess their financial situation and risk tolerance before using this platform.

Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.

Broker, exchange, trading platform, company names, product names, service marks, trademarks, and logos appearing on this website are the property of their respective owners and are used solely to identify supported connections and technical compatibility. TradersPost is an independent third-party platform and is not affiliated with, endorsed by, sponsored by, or authorized by any of these organizations unless expressly stated. Technical compatibility does not imply a commercial partnership, sponsorship, endorsement, or authorization. See Important Disclosures for trademark information.

© 2026 TradersPost, Inc. All rights reserved.