ERROR:kiteconnect.ticker:Connection closed: 1006 - connection was closed uncleanly (WebSocket connec

darsh
darsh edited April 2018 in Python client
MY code:
import logging
from kiteconnect import KiteTicker
logging.basicConfig(level=logging.DEBUG)
kws = KiteTicker("","")
def on_ticks(ws, ticks):
logging.info("Ticks: {}".format(ticks))

def on_connect(ws, response): # noqa
ws.subscribe([738561, 5633])
ws.set_mode(ws.MODE_FULL, [738561]
kws.on_ticks = on_ticks
kws.on_connect = on_connect
kws.connect()
Error message:
ERROR:kiteconnect.ticker:Connection closed: 1006 - connection was closed uncleanly (WebSocket connection upgrade failed (403 - Forbidden))
please help me to resolve this issue
  • sujith
    It seems like you are not passing invalid access token. You need to pass a valid access token.
  • darsh
    No,i am sure,i was passing valid access token,because i placed orders and do other works from python using same access token at about same time.
Sign In or Register to comment.