Wrong OHLC Data in historical API

imdkbj
imdkbj edited April 2020 in API clients
Hi,

Getting wrong candle OHLC data on some candles. i have checked with nodejs client as well as on curl. same response accross.

if Query : https://api.kite.trade/instruments/historical/256265/3minute?from=2020-04-17+09:15:00&to=2020-04-17+13:30:00
13:30 candle data : [
"2020-04-17T13:30:00+0530",
9121.85,
9128.8,
9121.4,
9128.2,
0
]

if Query : https://api.kite.trade/instruments/historical/256265/3minute?from=2020-04-17+09:15:00&to=2020-04-17+13:36:00
13:30 candle data: [
"2020-04-17T13:30:00+0530",
9121.85,
9140.55,
9121.4,
9136.05,
0
],



  • sujith
    This is because of the way it works. So when a user requests for 3minute candles, we fetch 1minute candles in the backend and group by 3 to make it 3minutes candle.

    So 1:27 will be 3 minutes -> which will have 1:27, 1:28, 1:29
    Since the request is capped to 1:30 for the request with to date till 01:30, the last candle is only one

    In case of request where to param is till 1:36, 130 will be 3 minutes -> which will have 1:30, 1:31: 1:32
Sign In or Register to comment.