'''''''''' name1 = exchange + ":" +names instrument_token=kite.ltp(name1)[name1]['instrument_token'] from_datetime = datetime.datetime.now() - datetime.timedelta(days=day) # From last & days to_datetime = datetime.datetime.now() interval = interval get_historical_data = kite.historical_data(instrument_token, from_datetime, to_datetime, interval, continuous=False, oi=False) '''''''''''' I Give him a stock list with a for loop. While the loop is running, some time error pops up. I am also using sleep time, but still some time error stops my loop.
PS: Make sure to remove client and app specific tokens.
name1 = exchange + ":" +names
instrument_token=kite.ltp(name1)[name1]['instrument_token']
from_datetime = datetime.datetime.now() - datetime.timedelta(days=day) # From last & days
to_datetime = datetime.datetime.now()
interval = interval
get_historical_data = kite.historical_data(instrument_token, from_datetime, to_datetime, interval, continuous=False, oi=False)
''''''''''''
I Give him a stock list with a for loop. While the loop is running, some time error pops up. I am also using sleep time, but still some time error stops my loop.