The official Python client library for the Kite Connect trading APIs
MIT License
978
stars
467
forks
source link
unable to get tick data error is "ERROR:kiteconnect.ticker:Connection error: 1006 - connection was closed uncleanly (WebSocket connection upgrade failed (403 - Forbidden))" #102
what is going wrong here in my code please tell me
import logging
from kiteconnect import KiteTicker
logging.basicConfig(level=logging.DEBUG)
kws = KiteTicker(api, token) // api is my api key and token is token got from url after login
def on_ticks(ws, ticks):
logging.debug("Ticks: {}".format(ticks))
def on_connect(ws, response):
ws.subscribe([738561, 5633])
ws.set_mode(ws.MODE_FULL, [738561])
def on_close(ws, code, reason):
ws.stop()
kws.on_ticks = on_ticks
kws.on_connect = on_connect
kws.on_close = on_close
kws.connect()
when i run this it shows error like "ERROR:kiteconnect.ticker:Connection error: 1006 - connection was closed uncleanly (WebSocket connection upgrade failed (403 - Forbidden))"
what is going wrong here in my code please tell me
when i run this it shows error like "ERROR:kiteconnect.ticker:Connection error: 1006 - connection was closed uncleanly (WebSocket connection upgrade failed (403 - Forbidden))"
please help me