kite connect not streaming ticker and order update

krishnanayan70
Hi, I am not getting tickers and order updates through kite connect. It was working until 12 aug, but it's not working after 15th aug.

Kite connect library being used: kiteconnect (java client) version: 3.1.14
  • SRIJAN
    SRIJAN edited August 2022
    Websocket API is working completely fine.

    You should always post the error you are getting.
    How can anyone help you without it??
  • krishnanayan70
    There is no error in connection.
    tickerProvider.setOnConnectedListener(() -> {
    tickerProvider.subscribe(tokens);
    tickerProvider.setMode(tokens, KiteTicker.modeQuote);
    log.info("Ticker connection established for " + tokens.size() + " instruments.");
    });

    tickerProvider.setOnOrderUpdateListener(order -> {
    log.info("Order update: "+order.orderId + " for " + order.tradingSymbol);
    orderUpdateProcessor.process(order);
    });

    tickerProvider.setOnTickerArrivalListener(ticks -> {
    if (ticks.isEmpty()) {
    log.warn("No ticks are being received currently.");
    }
    tickerProcessor.process(ticks);
    });
    I am getting empty ticks (The ticker connection is subscribed for valid instruments) and also on create/update order, I am not receiving order updates.

    logs for above code:
    2022-08-22 21:21:36.327  INFO 16851 --- [  ReadingThread] c.k.s.clients.KiteTickerProvider         : Ticker connection established for 64458 instruments.
    2022-08-22 21:21:37.619 WARN 16851 --- [ ReadingThread] c.k.s.clients.KiteTickerProvider : No ticks are being received currently.
    2022-08-22 21:21:40.617 WARN 16851 --- [ ReadingThread] c.k.s.clients.KiteTickerProvider : No ticks are being received currently.
    I haven't changed any code since 12 aug (last time it was working fine).
  • SRIJAN
    SRIJAN edited August 2022
    This is not helpful.

    You have to check for error under on error callback:
    https://github.com/zerodha/javakiteconnect/blob/836822ba12a43fe695d9b6e7ce36c437c09f3e42/sample/src/Examples.java#L584

    Or,run javakiteconnect with debug logs on and paste the logs .

    Make sure to hide your app details.

    Also,are you actually subscribing to 64458 instruments??
    Only 3000 per websocket connection are allowed.
  • krishnanayan70
    Thank you Srijan. This was very helpful. The error was like you mentioned. Because of large size of instruments, the message size was big and so the connection was terminating.
Sign In or Register to comment.