Is the "from" date and "to" date inclusive of the request?
I made the api call and the response includes penultimate tick but not the "to" date. However, when I tried the same call for the day which is ongoing, the response includes the "to" date.
@sujith my question is different. I understand that the last minute candle might not be synced with the clock time at my end.
However, the date interval inclusion should be consistent. Even if you make the API request right now (after market hours), you would still get the above response. My issue concerns whether the "to" date is included in the response data or not.
For example, when I define an interval from 1 to 10, my question is it a [1,10] or [1,10) interval. This policy should be consistent irrespective of server time.
For example - When you run the below in Python for May 30 (today)- kite.historical_data(1510401, '2018-05-30 14:50:00', '2018-05-30 14:52:00', 'minute') This will return candles from 14:50 to 14:52 (3 candles in total)
However, when you run the below for May 29 (same time intervals) - kite.historical_data(1510401, '2018-05-29 14:50:00', '2018-05-29 14:52:00', 'minute') This will return candles from 14:50 to 14:51 (2 candles in total)
This is inconsistent as the interval length should be precisely defined irrespective of anything else.
PS - This might change when you run it on May 31 (tomorrow). To get similar results, make one API request for the latest trading day (today) and another on previous/past trading days.
You can check out this thread for more information.
However, the date interval inclusion should be consistent. Even if you make the API request right now (after market hours), you would still get the above response. My issue concerns whether the "to" date is included in the response data or not.
For example, when I define an interval from 1 to 10, my question is it a [1,10] or [1,10) interval. This policy should be consistent irrespective of server time.
For example -
When you run the below in Python for May 30 (today)-
kite.historical_data(1510401, '2018-05-30 14:50:00', '2018-05-30 14:52:00', 'minute')
This will return candles from 14:50 to 14:52 (3 candles in total)
However, when you run the below for May 29 (same time intervals) -
kite.historical_data(1510401, '2018-05-29 14:50:00', '2018-05-29 14:52:00', 'minute')
This will return candles from 14:50 to 14:51 (2 candles in total)
This is inconsistent as the interval length should be precisely defined irrespective of anything else.
PS - This might change when you run it on May 31 (tomorrow). To get similar results, make one API request for the latest trading day (today) and another on previous/past trading days.
Our data team is working on it. It will take some more since this requires some architectural changes.