Historic data , "day" interval not giving any response which was working earlier

vishwas
var fromDtInit = new DateTime(DateTime.Now.Year,
DateTime.Now.Month,
DateTime.Now.Day
);

var toDtInit = new DateTime(DateTime.Now.Year,
DateTime.Now.Month,
DateTime.Now.Day,
);

resultList = OrderManager.GetHistoricalData(fromDt, toDt, symbolToken, Constants.INTERVAL_DAY);

this was working till now, suddenly it has stopped working. Other intervals are working.
can you please help?
  • rakeshr
    DateTime.Now.Day
    You need to request with the correct start and end day. If you are looking for current-day data, you need to send to date as next day.
  • sgsaran
    Till now I sent date format as from 2024-07-04+00:00:00 to 2024-07-04+23:59:00. It worked till last week. But now it returns empty array. I have to send previous date to get data. But it is wrong as per the date which I give. Look at the attached image. I requested from=2024-07-03+00:00:00&to=2024-07-04+23:59:00. But it didn't return 3rd date candle.






  • sgsaran
    Any update on this?
  • mb12
    From what i have figured out, now day interval data calls require 'from' and 'to' in date format, like:
    GET /instruments/historical/5040897/day?from=2017-01-01&to=2020-12-31&interval=day&continuous=0&oi=1

    Though would have been good if this change of API behavior was pre-informed by zerodha to kiteconnect api users.
  • rakeshr
    Thank you for highlighting this. We made a few changes to remove pre-market and post-market data for intraday requests, which resulted in this specific edge case missing for day intervals with hour, minute, and second timestamps. This has been addressed and should show the correct behavior starting tomorrow morning.
Sign In or Register to comment.