Connection closed: 1006 - connection was closed uncleanly (peer dropped the TCP connection without previous WebSocket closing handshake)
Here is the complete error and code. error: Connection closed: 1006 - connection was closed uncleanly (peer dropped the TCP connection without previous WebSocket closing handshake)
Alternatively, I am facing below error also:
ERROR:kiteconnect.ticker:Connection error: 1006 - connection was closed uncleanly (None)
ERROR:kiteconnect.ticker:Connection closed: 1006 - connection was closed uncleanly (None)
Please suggest
Here is the complete error and code.
error:
Connection closed: 1006 - connection was closed uncleanly (peer dropped the TCP connection without previous WebSocket closing handshake)
#################################
CODE
#################################
from kiteconnect import KiteTicker
tokens=[53703431,112129]
kws=KiteTicker('API KEY','ACCESS TOKEN')
def on_ticks(ws,ticks):
insert_tick=insert_ticks(ticks)
print(ticks)
def on_connect(ws,response):
ws.subscribe(tokens)
ws.set_mode(ws.MODE_FULL,tokens)
kws.on_ticks=on_ticks
kws.on_connect=on_connect
kws.connect()
Please search the forum before posting queries. The same query has been answered many times on the forum.