fromDate: Wed Dec 08 2021 09:15:00 GMT+0530 (India Standard Time) toDate: Thu Dec 09 2021 15:30:00 GMT+0530 (India Standard Time)
I'm passing from and to date as above mention format in getHistoricalData(). Result starts with right time, but last tick is of "Thu Dec 09 2021 10:00:00 GMT+0530 (India Standard Time)". Seems like incomplete data. Time of last tick varies based on toDate, but data is alway incomplete. Plz correct me if I'm going wrong. Enclosing a image too.
Left of Image have watch panel, It has : 1.paramList i.e getHistoricalData() parameters 2. data first value of received result 3. data[data.length-1] last value of received result.
PS: shouldn't last value be same or closest to toDate.
So, to iterate the same, node js time object by default convert any timezone to GMT. So, your request
fromtime object of
03:45i.e 09:15:00-05:30(Hrs) and to time object of 15:30:00 became
You can add a buffer of 05:30 Hrs in your time request period to get exact period candle data. Something like
to_period: 15:30:00 + 05:30(Hrs) = 21:00:00