Main loop is getting executed only once.

Hi ,
I am using the below code. Here "on_ticks" loop is executing only once . After that my connection is getting closing.
Can any one please let me know what is wrong in the code.?

def on_ticks(ws,ticks):

def on_connect(ws, response):
def on_close(ws, code, reason):
# On connection close stop the main loop
# Reconnection will not happen after executing `ws.stop()`

# Assign the callbacks.
kws.on_ticks = on_ticks
kws.on_connect = on_connect
kws.on_close = on_close
  • rakeshr
    You need to remove ws.stop(), as it gets called at end of each execution and closes the connection.
Sign In or Register to comment.