It is possible to retrieve candles for small time intervals by making the from and to calls granular. For instance from = 2017-01-01 09:15:00 and to = 2017-01-01 09:30:08 to fetch candles for just 15 minutes between those timestamps. If yes in any other way, can you provide the sample code for this. I tried but not getting result.
Hi @ajit_kumar1,
You can get 15 min or any other intraday time frame from July 2017. For example, if you want 15 min data of divis lab as of 3rd July 2017, you can use the below code
from fyers_api import fyersModel
client_id = “SPXXXXE7-100”
access_token = “eyJ0eXAiOiJK***.eyJpc3MiOiJhcGkuZnllcnM***.IzcuRxg4tnXiULCx3***”
fyers = fyersModel.FyersModel(client_id=client_id, token=access_token, log_path=“/home/user/logs”)
data = {
“symbol”:“NSE:DIVISLAB-EQ”,
“resolution”:“15”,
“date_format”:“1”,
“range_from”:“2017-07-03”,
“range_to”:“2017-07-03”,
“cont_flag”:“1”
}
response = fyers.history(data=data)
print(response)
I want only first 15 min candle data for from = 2023-05-01 09:15:00 and to = 2023-05-16 09:30:08
You can fetch the required details in the document.