It looks like you're new here. If you want to get involved, click one of these buttons!
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))"
You can know more here.