101 Switching Protocols error

mailboxofrafiq
@sujith

I am getting following error while connecting to websocket

com.neovisionaries.ws.client.OpeningHandshakeException: The status code of the opening handshake response is not '101 Switching Protocols'. The status line is: HTTP/1.1 400 Bad Request
at com.neovisionaries.ws.client.HandshakeReader.validateStatusLine(HandshakeReader.java:232)
at com.neovisionaries.ws.client.HandshakeReader.readHandshake(HandshakeReader.java:54)
at com.neovisionaries.ws.client.WebSocket.readHandshake(WebSocket.java:3244)
at com.neovisionaries.ws.client.WebSocket.shakeHands(WebSocket.java:3123)
at com.neovisionaries.ws.client.WebSocket.connect(WebSocket.java:2155)
at com.zerodhatech.ticker.KiteTicker.connect(KiteTicker.java:213)

My code is exactly same as your Examples.java

I tried with both with and without endpoints.

KiteTicker tickerProvider = new KiteTicker(kiteConnect().getUserId(),
kiteConnect().getAccessToken(), kiteConnect().getApiKey());

KiteTicker tickerProvider = new KiteTicker(kiteConnect.getUserId(), kiteConnect.getAccessToken(), kiteConnect.getApiKey(), "wss://websocket.kite.trade/v3");


  • sujith
    Hi,
    We have updated binary and examples in kite3 branch. Use the latest one from release page.
    This endpoint was for development purpose.
  • mailboxofrafiq
    I can able to get ticks.. May be now market closed... I got only one tick..
    But I am NOT getting order update call. I created AMO order of SBIN NSE.. and then cancelled it..
    For this I was expecting onOrderUpdate listener call.. but it is not working.. Am I missing something @sujith ??
  • sujith
    Hi,
    For placing an order you won't get order update. The confirmation for placement is the order id received after order placement is successful.
    Ideally, you should get order update for order cancellation. For amo cancellation, we haven't configured sending order updates. We will make changes to send order updates for amo cancellation.
  • mailboxofrafiq
    Yes please enable amo order cancellation update
Sign In or Register to comment.