Advanced algo trade

@Tradehull_Imran Sir, I am not getting the historical data fo any stocks.

It is showing as object type is not subscriptable.

Are you also facing this issue today.

data = tsl.get_historical_data(tradingsymbol=‘ACC’, exchange=‘NSE’, timeframe=“1”)

i used this, I’m able to get data for futures , options and index.
But I’m not getting the data for stocks.

Pleas help @Tradehull_Imran

Hi @SANJAY_KUMAR18 ,

Do make sure your using correct exchange as below :

# For Options
data  = tsl.get_historical_data(tradingsymbol = 'NIFTY 24 APR 23000 CALL',exchange = 'NFO' ,timeframe="1")

# For Futures
data  = tsl.get_historical_data(tradingsymbol = 'NIFTY APR FUT',exchange = 'NFO' ,timeframe="1")

# For Index
data  = tsl.get_historical_data(tradingsymbol = 'NIFTY',exchange = 'INDEX' ,timeframe="1")

Hello Sir,

I’m facing the issue when I’m trying tot get the historical data for Stocks.

I’m getting the data for index, futures and option.

Can you please verify about the stocks.

Hi Sir, what code should i use to get the data for past 5 years as dhan is providing the 5 year data.

Can you share the code for it.

Hi @SANJAY_KUMAR18 ,

Currently Dhan is not providing 5 years of data.