Charting

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.

Tom Hartman

Marketing

9 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.

If you have searched for a TradingView API to pull price data, read indicator values, or automate trades from your own code, you have run into a wall that many traders hit. TradingView's own help center states plainly: "We don't have an API that gives access to data as of now."1 That single sentence explains a lot of confusion in the developer community.

What TradingView does publish is narrower and more specific than most people expect: two charting libraries for embedding charts in your own product, a datafeed specification you implement yourself, and a broker REST API that requires a signed integration agreement before you can access it.2 None of these give you programmatic access to TradingView's market data or indicator output.

This article walks through exactly what exists, what does not, and what actually works for traders who need TradingView logic to trigger actions outside the platform.

No Public REST API Exists

What TradingView Support States

TradingView's help center is direct on this point: there is no API that gives access to data, and the team notes they are planning to add one in the future.1 The same page clarifies that their REST API is intended for brokers who want to be supported on the trading platform, not for general developer access.1

Any third-party tool claiming to provide a TradingView data API is accessing private or undocumented endpoints. Those endpoints are not sanctioned, not stable, and using them likely violates TradingView's terms of service.

What This Means for Traders

You cannot programmatically pull price data, indicator values, or Pine Script output from TradingView into your own application via a supported API. Scraping or reverse-engineering private endpoints can break without notice, and there is no recourse when it does. The absence of a public data API is a deliberate product boundary, not an oversight.

What TradingView Actually Publishes

Lightweight Charts: Open-Source Library

Lightweight Charts is an open-source, Apache 2.0-licensed HTML5 charting library published on GitHub with over 17,000 stars.3 It is designed for embedding interactive financial charts in web pages without a heavy performance cost. Critically, the library accepts data you supply; it does not fetch data from TradingView's servers.3 You bring your own price data, and the library handles rendering.

Advanced Charts: Self-Hosted Charting Library

TradingView also publishes Advanced Charts, a separate charting library product with its own documentation site.2 The documentation summarizes the model clearly: "Your servers, your data, TradingView's charts."2 Integration requires you to implement a datafeed specification yourself, pointing the library at your own data source. The library renders TradingView-style charts using data from your infrastructure, not TradingView's market data.

The Broker REST API: Agreement-Gated

TradingView does publish a REST API specification, but access is provided only after signing a brokerage integration agreement.4 The spec is aimed at brokers who want to appear on TradingView's platform and let users trade directly from charts. This is not a general-purpose trading or data API available to individual traders or independent developers.

The Datafeed Specification

What the Spec Defines

The Advanced Charts documentation describes a datafeed interface that developers implement to feed their own price data into the charting library.2 You build the server-side component; TradingView's charting library calls your endpoints. This is an inbound spec for data you own, not a mechanism for accessing TradingView's market data feed.

Who This Is For

The charting library and datafeed spec are business solutions aimed at companies building trading platforms or financial data products. Individual retail traders running strategies on TradingView.com cannot use this to extract indicator output or historical data programmatically. Chart data export to CSV is available for manual use on paid plans, but that is a UI-level export, not an API.5

Exporting Data Without an API

CSV Export from Supercharts

TradingView does let you download chart data, including tickers and indicator values, as a CSV file from the Supercharts toolbar.5 The export covers whatever data is currently loaded on the chart, and scrolling the chart left before exporting loads more historical data.5 This is a manual, point-in-time export, not a programmatic feed.

Limitations of the Export

The CSV export is a UI action, not an endpoint you can call from code on a schedule. Historical bar depth depends on your TradingView plan tier: the Basic plan offers 5,000 bars, Essential and Plus offer 10,000, Premium 20,000, and Ultimate 40,000.6 No mechanism exists to automate this export or stream live data out of TradingView via a supported method.

Alerts and Webhooks: The Supported Path

How Webhooks Work

TradingView webhooks send an HTTP POST request to a URL you provide whenever an alert fires.7 The alert message body is delivered as the POST payload. If the message is valid JSON, TradingView sets the content-type header to application/json; otherwise the request uses text/plain.7 Webhook alerts require two-factor authentication to be enabled on the TradingView account.7

Technical Constraints to Know

Before building a receiver, note these hard constraints published by TradingView:7

  • Only ports 80 and 443 are accepted; requests to other ports are rejected.
  • If the receiving server does not respond within three seconds, the request is cancelled.
  • IPv6 is not currently supported; your receiver must be reachable over IPv4.
  • Four IP addresses are published for allowlisting: 52.89.214.238, 34.212.75.30, 54.218.53.128, and 52.32.178.7.

Plan Requirements for Webhooks

Webhook notifications are not available on the free Basic plan; a paid subscription is required.6 The Essential plan and above include webhook support. The number of active technical alerts and price alerts, as well as alert durations, all scale with plan level.6

Routing Webhook Signals to a Broker

The Gap Webhooks Leave Open

A TradingView webhook posts a JSON payload to a URL, but TradingView has no native mechanism to translate that payload into a brokerage order. Bridging the gap requires a middleware layer that receives the webhook, parses the signal, and forwards an order to a supported broker API. Building and hosting this middleware yourself means managing server uptime, broker authentication, order logic, and error handling.

How TradersPost Fills That Role

TradersPost receives TradingView webhook payloads and routes the resulting orders to connected broker accounts. A minimal signal payload needs at least a ticker and an action field; optional fields like orderType, quantity, stopLoss, and takeProfit let you control execution detail directly from the alert message. The platform supports stocks, options, futures, and crypto across multiple brokers, with paper trading available for testing before going live.

Point your TradingView alert's webhook URL at TradersPost, format the JSON payload with fields like ticker and action, and TradersPost handles the order routing to your connected broker. No server to host, no broker authentication code to maintain.

If You Need Market Data Programmatically

Alternatives With Public APIs

Several data providers publish documented REST or WebSocket APIs for market data. Alpaca, Polygon.io, and exchange-direct feeds are common choices for retail developers. These are separate products from TradingView and require their own accounts and authentication. Using an external data source does not prevent you from also using TradingView for charting and signal generation.

Pine Script as a Signal Generator

Pine Script strategies and indicators run inside TradingView and can trigger alerts based on any logic you code. The alert message can include dynamic values like closing price using TradingView placeholders such as {{close}} and {{timenow}}. This keeps your signal logic inside TradingView while the webhook carries only the output, not raw data, to an external receiver.

Bottom Line

What to Take Away

  • TradingView has no public API for data or indicator values; TradingView's own support page confirms this.1
  • The published charting libraries (Lightweight Charts and Advanced Charts) are for embedding charts in your own product, not for reading TradingView's data.3
  • The broker REST API exists but is gated behind a signed agreement and is intended for brokers building platform integrations.4
  • Webhooks, available on paid plans with 2FA enabled, are the only supported mechanism for acting on TradingView logic from outside the platform.7
  • Webhook receivers must accept connections on ports 80 or 443, respond within three seconds, and support IPv4 only.7

Frequently Asked Questions

Does TradingView have a public API for market data or indicator values?

No. TradingView's help center states directly that no data API is available as of now.1 Third-party tools that claim to offer a TradingView API are accessing private, undocumented endpoints that can break or be blocked at any time. The only documented, supported way to get output from TradingView logic into an external system is via webhook alerts.

What plan do I need for TradingView webhooks?

Webhooks require a paid plan; the feature is not available on the free Basic tier.6 Two-factor authentication must also be enabled on the account before webhook alerts can be configured.7 The number of active alerts you can run simultaneously varies by plan level.6

Can I use the TradingView charting library to access TradingView's data?

No. The Advanced Charts library requires you to implement your own datafeed and point it at data you control.2 Lightweight Charts is similarly data-agnostic: you supply the price data; the library only handles rendering.3 Neither library connects to or exposes TradingView's market data feed.

What happens if my webhook receiver is too slow to respond?

TradingView cancels the webhook request if the receiving server does not respond within three seconds.7 You can monitor delivery outcomes in the webhook status column in the TradingView alert log.7 Designing your receiver to acknowledge the request immediately and process asynchronously is the standard approach for avoiding timeout failures.

How do I get TradingView alert data into a broker order?

TradingView does not natively route alerts to brokers; a middleware layer is required to receive the webhook and translate it into a brokerage order. The JSON payload from a TradingView alert can include fields like ticker, action, price, and order type instructions that a middleware service interprets. Platforms such as TradersPost are built specifically to receive these payloads and forward orders to connected broker accounts without requiring you to build and host the infrastructure yourself.

References

1 I need access to your API in order to get data or indicator values - TradingView Help Center
2 Advanced Charts Documentation - TradingView
3 tradingview/lightweight-charts - GitHub
4 Brokerage Integration - TradingView
5 How to export chart data - TradingView Help Center
6 Pricing - TradingView
7 How to configure webhook alerts - TradingView Help Center

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

    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.

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.