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.
# 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...")
logging.info("Kite connect infinite loop exited for some reason")
python3 websocket.py > info.log 2>&1 &
kws = KiteTicker(apiKey, accessToken, debug=True), which prints ping ,pong logs.