For 1 min interval historical data displaying but if i give 5 min ‘Please select valid resolution’ like this shows. Only 1 min and ‘D’ only working. 5, 15, 30, 60, etc. not working. Below code only i run.
Kindly anyone guide me on how to take different interval historical data. Thank You !
from pya3 import *
import pandas as pd
from datetime import datetime, timedelta
instrument = alice.get_instrument_by_symbol(“NFO”, “NIFTY2372019350CE”)
from_datetime = datetime.now() - timedelta(days=1) # From last & days
to_datetime = datetime.now() # To now
interval = “5” # [“1”, “D”]
indices = False # For Getting index data
print(alice.get_historical(instrument, from_datetime, to_datetime, interval, indices))
Regards,
Mohan Raj