Using Fyers MYAPI 2, can we get NIFTY and BANKNIFTY history data until previous minute during market open hours? For example, assume market is open today and now the time is 10:01 AM, can I pull NIFTY data until 10:00 AM on a 1//3/5/10 minutes timeframe?

Using Fyers MYAPI 2, can we get NIFTY and BANKNIFTY history data until previous minute during market open hours? For example, assume market is open today and now the time is 10:01 AM, can I pull NIFTY data until 10:00 AM on a 1//3/5/10 minutes timeframe? Will the FyersModel.history() in python get this requirement done?

Hey Ravi,
Yes you can pull the latest data, The requirement will be satisfied, just give the correct range_*from and range_to value *from where to where you need the data from.

Hi Vikram,
Thank you for the reply, I checked and it is working. Point to be noted, this works only for epoch dates. If we give range_from and range_to values in ‘YYYY-MM-DD’ format, then we cannot get intraday history on that particular trading day. Just an observations. Thank you.

For now you can give the range_to value as the next day such as 2021-09-14, I will have a look for the current date.

data = {“symbol”:“NSE:NIFTY20OCTFUT” , “resolution”: “1”, “date_format”: “1”,
“range_from”: “2020-10-01”, “range_to”: “2020-10-31”, “cont_flag”: “1”}
Dose this work ?