Incomplete historical data in Node JS API

vitrivedi
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[0] 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.
  • rakeshr
    This thread explains your above query regarding node js client.
  • vitrivedi
    when i m passing from date as "Wed Dec 08 2021 09:15:00 GMT+0530 (India Standard Time)" and to date as "Thu Dec 09 2021 15:30:00 GMT+0530 (India Standard Time)" along with other parameters, then i m expecting that in array that i will receive as result, 1st items datewill be "Wed Dec 08 2021 09:15:00" and last item date will be "Thu Dec 09 2021 15:30:00". But last items date is coming "Thu Dec 09 2021 10:00:00 GMT+0530". Son instead of getting data till 3:30pm i m only getting till 10:00 am
  • vitrivedi
    Hey! I m still waiting for reply. Plz help
  • rakeshr
    You don't seem to have gone through the above-linked thread, which explains this query.
    So, to iterate the same, node js time object by default convert any timezone to GMT. So, your request from time object of 09:15:00 became 03:45 i.e 09:15:00-05:30(Hrs) and to time object of 15:30:00 became 10:00:00(15:30:00-05:30(Hrs)).
    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
Sign In or Register to comment.