Features

TradingView data

Pull TradingView bars for stocks, futures, crypto, and FX, and search its symbols

How do you get TradingView data into Python? vbt.TVData pulls bars for stocks, futures, crypto, FX, and indexes in TradingView's own symbol notation, without an account, and returns them as one data object ready for indicators and backtests.

Pull daily bars for six markets in one call and compare 2024
symbols = [
    "NASDAQ:AAPL", "CME_MINI:ES1!", "BINANCE:BTCUSDT",
    "TVC:DXY", "FX:EURUSD", "TVC:GOLD",
]
data = vbt.TVData.pull(symbols, timeframe="1D")  
year = data.loc["2024"]
first = year.close.apply(lambda s: s.dropna().iloc[0])
last = year.close.apply(lambda s: s.dropna().iloc[-1])
returns = (last / first - 1).round(4)
pd.DataFrame({"bars": year.close.notna().sum(), "return": returns})
                 bars  return
symbol
NASDAQ:AAPL       252  0.3490
CME_MINI:ES1!     252  0.2399
BINANCE:BTCUSDT   366  1.1181
TVC:DXY           259  0.0614
FX:EURUSD         260 -0.0534
TVC:GOLD          252  0.2747

A stock, a continuous futures contract, a crypto pair, the dollar index, a currency pair, and gold came back in one call. Each market keeps its own calendar: Bitcoin traded on all 366 days of 2024, stocks on 252, and FX on 260, which is why each column above counts its own bars.

From chart data to Python research

Use the symbols you already follow on TradingView as inputs to a Python strategy. Once pulled, data.close gives you prices across symbols, and data.run can compute indicators from the available OHLCV fields. Pass the data and your entry and exit signals into a signal backtest, then compare instruments and parameter choices in the same workflow.

This is useful for testing a chart idea across several markets, building an index-member universe, or combining a daily trend with intraday entries through multi-timeframe analysis.

Pulling bars

Symbols use TradingView's notation, EXCHANGE:SYMBOL. Use minute, hourly, daily, weekly, or monthly bars, as in "1 minute", "1 hour", or "1D". The adapter also accepts second-based timeframes where TradingView makes them available. tz converts the index to a market's local time. Prices are adjusted for splits by default, adjustment also accounts for dividends, and extended_session=True adds pre-market and after-hours bars. For futures, fut_contract=1 returns the continuous front contract and fut_contract=2 the next one. Assign data = data.update() to refresh the available bars and combine them with your stored history.

There is no start date. TradingView serves the most recent bars, up to limit, so pull them and then select the period you need with data.loc, as the example above does for 2024. The class downloads bars only, not the values of TradingView indicators or strategies. An error about data that could not be parsed usually means the symbol or timeframe does not exist on that exchange, and skip_on_error=True skips such symbols in a larger pull.

Match the chart you are researching

Before comparing an indicator or backtest with a TradingView chart, match the data choices:

Chart settingVBT input
Instrument and exchangeThe full EXCHANGE:SYMBOL identifier
Bar intervaltimeframe
Regular or extended sessionextended_session
Split or dividend adjustmentadjustment
Display timezonetz

Different sessions and adjustments can change the indicator even when its formula is identical. VBT's technical indicators and custom indicators let you calculate the studies in Python from those bars.

If you need values already calculated on a chart, TradingView can export chart data and indicators to CSV. Load that export with vbt.CSVData or Pandas, keeping its timestamp and indicator columns. The storage page covers file inputs. This provides another route for comparing chart outputs with your Python calculations.

Finding symbols

vbt.TVData.list_symbols searches TradingView's symbols by pattern, exchange, or text, and its market scanner lists symbols by market, by field values such as sector, or by index membership:

List the members of the Nasdaq-100
ndx = vbt.TVData.list_symbols(groups=dict(index="NASDAQ:NDX"))
len(ndx), ndx[:5]
(101, ['NASDAQ:AAPL', 'NASDAQ:ABNB', 'NASDAQ:ADBE', 'NASDAQ:ADI', 'NASDAQ:ADP'])

The list holds today's members, so a backtest over past years built from it carries survivorship bias, as the Realistic backtests page explains.

You can also request scanner fields such as sector, currency, or market capitalization and filter the results before downloading bars. With return_field_data=True, symbol discovery returns those fields alongside the symbol names, so you can keep the information used to select your research universe.

History and accounts

TradingView serves a limited number of bars per symbol, so the depth of history depends on the timeframe: daily bars reach back years, while one-minute bars covered about the last six weeks for AAPL on October 2, 2026. VBT requests up to 20,000 bars by default. Signing in with your own TradingView username and password, or a session token, through client_config uses the access of your account. You can reuse an authenticated TVClient across pulls instead of creating a new client for each one. TradingView's exchange data subscriptions are separate from VBT PRO, and TradingView says its paid plans do not include exchange data fees.

Standard TVData pulls retrieve recent bars. They do not automate TradingView's Bar Replay or page backward through the full chart history. Updating requests the recent window again and merges it into the existing object. For long intraday history, the commercial providers on the Market data sources page fit better, and Data storage and databases keeps what you download growing over time.

Terms of use

TradingView data is subject to TradingView's terms. Use your own account where they require it, and check them before using the data beyond personal research.

Trading View

✅ A new class specialized for pulling data from TradingView is now available.

Pull 1-minute AAPL data
data = vbt.TVData.pull(
    "NASDAQ:AAPL",
    timeframe="1 minute",
    tz="US/Eastern"
)
data.get()
                             Open    High     Low   Close   Volume
datetime
2022-12-05 09:30:00-05:00  147.75  148.31  147.50  148.28  37769.0
2022-12-05 09:31:00-05:00  148.28  148.67  148.28  148.49  10525.0
2022-12-05 09:32:00-05:00  148.50  148.73  148.30  148.30   4860.0
2022-12-05 09:33:00-05:00  148.25  148.73  148.25  148.64   5306.0
2022-12-05 09:34:00-05:00  148.62  148.97  148.52  148.97   5808.0
...                           ...     ...     ...     ...      ...
2023-01-17 15:55:00-05:00  135.80  135.91  135.80  135.86  37573.0
2023-01-17 15:56:00-05:00  135.85  135.88  135.80  135.88  18796.0
2023-01-17 15:57:00-05:00  135.88  135.93  135.85  135.91  21019.0
2023-01-17 15:58:00-05:00  135.90  135.97  135.89  135.95  20934.0
2023-01-17 15:59:00-05:00  135.94  136.00  135.84  135.94  86696.0

[11310 rows x 5 columns]

Copyright © 2021–2026 Oleg Polakow. All rights reserved.

Site content and documentation are provided for using and evaluating VectorBT PRO and for educational purposes. Any other use, including building or supporting competing products or services, requires prior written consent.