A Simple TradingView Data Downloader. TradinViewData allows downloading upto 5000 Candles on any of the supported timeframe.
from TradingviewData import TradingViewData,Interval
request = TradingViewData()
To find the exact symbols for an instrument you can use request.search_symbol
method.
request.search('METAL','MCX')
Other method is check Manually via Tradingview Search.
nifty_data = request.get_hist(symbol='NIFTY',exchange='NSE',interval=Interval.hour_1,n_bars=1000)
nifty_futures = request.get_hist(symbol='NIFTY',exchange='NSE',interval=Interval.hour_1,n_bars=1000,fut_contract=1)
relience_data = request.get_hist(symbol='RELIANCE',exchange='NSE',interval=Interval.min_5,n_bars=5000)
crudeoil_data = request.get_hist(symbol='CRUDEOIL',exchange='MCX',interval=Interval.hour_1,n_bars=5000)
extended_data = request.get_hist(symbol="EICHERMOT",exchange="NSE",interval=Interval.hour_1,n_bars=500, extended_session=False)