It looks like you're new here. If you want to get involved, click one of these buttons!
today = datetime.date.today()
month_ago = today - datetime.timedelta(days=30)
to_dt=today.strftime('%Y-%m-%d')
from_dt=month_ago.strftime('%Y-%m-%d')
interval='60minute'
data[i] =pd.DataFrame(kite.historical(activeList[i]['instrument_token'] , from_dt , to_dt , interval))
# activeList contains instrument token for 9 commodities with recent expiries
All HTTP requests to Kite Connect are restricted to 3 requests per second. You will have to make your requests in a queue.