Zero Bytes / Empty Packets returned from websocket connection

Kulbir
Hi,

I have recently purchased the paid subscription for KITE Connect and I am using the JAVA Client for KITE Connect from Rainmatter Tech.I am testing the API Calls from com.rainmatter.test.Test.java. I am running this client in my local machine using my local JVM.

I tried calling the web-sockets and I am able to make a successful connection but there are not bytes being returned, the size of the packet being returned is zero, I am trying with Tokens(12485 , 14006), mode is LTP. Can anyone please provide some inputs on this.

  • pranksterguru
    hmm... strange even i am getting empty packets today

    it used to work before.... has there been anything changed?
  • chandankr@yahoo.com
    Same here. Websockets not working properly since yesterday. Data stops without any exceptions and re connecting takes 4-5 manual tries.
  • pranksterguru
    @chandankr@yahoo.com do you get data after reconnect?

    i am not getting any data at all

    guys please help

    @sujith @Kailash @vivek
  • Vivek
    @chandankr@yahoo.com @praksterguru Please make sure you are sending your currently active public token and also check for the error status code you are getting and post it here, if it's 403 then you are not sending an active public token.
  • smir99
    Same here , Faced Web socket issue today
  • pranksterguru
    im sending the active public token for sure..!
  • chandankr@yahoo.com
    same here. Sending correct public access token. This was working flawlessly till Friday. Problem since yesterday. @pranksterguru I get data after multiple manual reconnects. Till Friday, websockets connection used to be established in a single try.
    Obviously I am sending correct token because on 4th or 5th manual try connection gets established. Something has definiitely changed at your end. Pls look into it asap.
  • chandankr@yahoo.com
    @vivek No error code and no response in the websockets events - on("connect" itself doesnt happen - you have to keep trying again and again manually to get connection. And after sometime data just stops coming, again with no error code and no response in any of the event handlers. Same in both nodejs and python APIs. Looks like a infra issue at your end - have you made any changes to physical infra over the weekend?
  • Vivek
    Sorry for the inconvenience, We are investigating the issue currently.
  • Vivek
    Can you guys check if it's happening now? We have enabled logging for all the requests so we could pinpoint the issue.
  • chandankr@yahoo.com
    hasnt happened since around 11am today. Data is coming properly since then. But there are definitely issues at ur end. Look at this chart from kite - datea missing for 30mins.
  • sujith
    @chandankr@yahoo.com,
    Chart issue has nothing to do with websockets. We have fixed chart issue, we will re populate data soon.
  • Kulbir
    Still empty packets being returned, I am not sure whether this is an issue from KITE CONNECT or from my side, I am able to see the size as zero bytes, although the connection parameter is returning as true. Quotes are working fine, so it is not an issue of a Public Token
  • sujith
    Hi @Kulbir,
    Kite Ticker keeps sending heartbeat ticks. So it is fine if you are getting ticks with zero bytes.
    Can you confirm, if you are still getting the exception that you posted on other thread?

    If that exception exists then you will not be getting heartbeat ticks.
  • Kulbir
    Hi Sujith,

    Agreed that Kite Ticker is sending ticks with zero bytes but how do I get the data, shouldn't the websocket's be sending data during market Hours ? I have tried calling the websockets with different Symbol tokens, for Example HINDALCO(3184897), MARUTI(2815745).
  • Kulbir
    Kulbir edited February 2017
    Hi Sujith,

    I am not facing the SSL Handshake issue anymore, I fixed it by replacing the following two JARS for my JRE :

    local_policy.jar
    US_export_policy.jar

    Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 8 Downloaded from :
    http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html
  • Kulbir
    Hi Sujith,

    I am sorry but the Handshake Exception still keeps Occurring, I have to execute the above 2 Jars every time to fix that exception ? What could be the reason for that exception and is it because of this that I am getting zero bytes from websockets even during market hours ?

    com.neovisionaries.ws.client.WebSocketException: Failed to send an opening handshake request to the server.
  • pranksterguru
    guys,
    in case if you still have this issue, please check the below items
    1. you are subscribing with arraylist of integers(check the data type)
    2. please sure you are not sending invalid instrument token
    3. do not send duplicate tokens
    4. do not open empty websockets
  • Kulbir
    Yes I am subscribing with Array List of Integers. I am able to get ticks today, yesterday seems like there was some issue with websockets. Do the Tokens keep changing on a daily / monthly basis, can I hardcode them into my code as I need only a limited number of Tokens, around 200.

    Also in the instrument List how can I find Futures Contracts for the current month, I am not able to see them in the NSE Instrument List.
  • sujith
    Hi @Kulbir,
    Instruments file is updated everyday, instrument token might not change everyday but it might change overnight. So I would suggest you to download instruments everyday once and store that file.

    For F&O contracts, you can fetch instruments by passing exchange as NFO.
  • Kulbir
    Ok Thanks, this was helpful, by the way can you please help the other issue mentioned in the other Thread Websockets not working when accessing behind a proxy
This discussion has been closed.