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("your_api_key", "your_access_token")
def on_connect(ws, response):
logging.debug("Connected")
def on_close(ws, code, reason):
ws.stop()
def on_order_update(ws, data):
logging.debug("Order update : {}".format(data))
# Assign the callbacks.
kws.on_connect = on_connect
kws.on_close = on_close
kws.on_order_update = on_order_update
kws.connect()