after kws.connect() gets executed, it gets on infinite loop and execute on_tick method, but in my case it get executed some time and does nothing for most of the time. Is there any problem with the websocket api
on_tick method is not looping, it is getting heartbeat signal from ticker server. So it basically gives confirmation that websocket connection is alive. KiteTicker what you are using is used by 1.8 lakh+ users of Zerodha. We haven't had any complaints regarding this. We do have some clients complaining that marketwatch is not ticking who are using Reliance. We have tested and seen more than 30 percent of packet loss in Reliance connection. So I would request you to use your an alternate ISP.
@mohit77bansal If it gets disconnected immediately after you start then there is issue with your server/system ssl. This has been reported previously by Ubuntu users and it turned out to be issue with open ssl. The work around is to pass param disable_ssl_verification to connect method.
I had change the code as told by vivek. The thing is earlier my code were working fine, but recently my kite developer trade account had expired but i had enable that again. The problem had start after renewing the account. My user id is RA8927 . So, can you check if there is no issue with the api key and api secret.
What client are you using?
on_tick method is not looping, it is getting heartbeat signal from ticker server. So it basically gives confirmation that websocket connection is alive. KiteTicker what you are using is used by 1.8 lakh+ users of Zerodha. We haven't had any complaints regarding this. We do have some clients complaining that marketwatch is not ticking who are using Reliance. We have tested and seen more than 30 percent of packet loss in Reliance connection. So I would request you to use your an alternate ISP.
My sample code is as follow:
kws.connect()
a = kws.is_connected()
print a
so, if the connection is live, it shouldnt print a, but eventually it prints a and the value is FALSE.
I had also tried to use try and catch with while loop, but once it gets disconnected, it doesn't get connect next time.
One more thing, which version of python is more suitable, 2.7 or 3.5
disable_ssl_verification
toconnect
method.kws.connect(disable_ssl_verification=True)
I had change the code as told by vivek. The thing is earlier my code were working fine, but recently my kite developer trade account had expired but i had enable that again. The problem had start after renewing the account. My user id is RA8927 . So, can you check if there is no issue with the api key and api secret.