getOHLC javalibrary -this is for what time period?how do we pass timeframe

VICKY123
public Map getOHLC(String [] instruments) throws KiteException, IOException, JSONException {
JSONObject resp = new KiteRequestHandler(proxy).getRequest(routes.get("quote.ohlc"), "i", instruments, apiKey, accessToken);
Type type = new TypeToken
>(){}.getType();
return gson.fromJson(String.valueOf(resp.get("data")), type);
}
Tagged:
  • sujith
    @VICKY123,
    This gives you day OHLC value. It doesn't provide intraday OHLC. You need to generate candles at your end using the Websockets data. You can check out this thread.
    You can use historical data API for backtesting but for live strategies, I would suggest generating candles at your end.
Sign In or Register to comment.