Not getting data of Historical Data for short interval.

QD1497 edited July 8 in Node JS client
I am not able to get data of per minute. If I am entering range of a day it's working fine but not for range of some minutes. Can you please check for it?
  • rakeshr
    We just checked for the minute interval for the node js client. It's working perfectly fine at our end.
  • QD1497
    if I am entering the range from 9:00 - 9:30 it's not working but if I enter 9-00 - 3:00 it gives me data of minute interval. Can you please check this?
  • rakeshr
    Yes, it's showing fine. We just checked below request:
    kc.getHistoricalData(408065, 'minute', '2021-05-27 09:00:00', '2021-05-28 09:30:00', false)
    PS: In node js, Date objects by default are always zero UTC offset i.e in the UTC time zone. You can go through this thread to know more.
  • QD1497
    I tried
    kc.getHistoricalData(256265, "5minute", new Date("2021-07-08 10:50:00"), new Date("2021-07-08 11:00:00"))

    but returning me blank array
  • rakeshr
    new Date("2021-07-08 10:50:00") new Date("2021-07-08 11:00:00")
    new Date constructor converts Date objects without time zone info to UTC time zone by default.
    So, this new Date("2021-07-08 10:50:00") represent as 2021-07-08T05:20:00.000Z i.e 05:20 AM.
    So, either you have to consider sending time object with UTC suffix, something like:
    new Date("2021-07-08 10:50:00 UTC"), new Date("2021-07-08 11:00:00 UTC")
    Or, send time data in string, something like:
    kc.getHistoricalData(408065, '5minute', "2021-07-08 10:50:00", "2021-07-08 11:00:00", false)
Sign In or Register to comment.