It looks like you're new here. If you want to get involved, click one of these buttons!
# Assign the callbacks.
kws.on_ticks = on_ticks
kws.on_connect = on_connect
kws.on_close = on_close
kws.on_error = on_error
kws.on_reconnect = on_reconnect
kws.on_noreconnect = on_noreconnect
kws.on_order_update = on_order_update
# Infinite loop on the main thread. Nothing after this will run.
# You have to use the pre-defined callbacks to manage subscriptions.
logging.info("Starting Kite-Ticker connect...")
kws.connect()
logging.info("Kite connect infinite loop exited for some reason")
I have been mining kite ticker data for 1 stock but my program all of a sudden closes without any error. The below command line starts my program in background and stores logs in a file. python3 websocket.py > info.log 2>&1 &
kws = KiteTicker(apiKey, accessToken, debug=True)
, which prints ping ,pong logs.
moroever since this is hosted in aws, i would recommend you to check this script in local desktop first for debugging.. only then we can conclude issue origination.
You have not show your on_ticks function, which might be the culprit depending on how it has been written