Using websocket client, we are able to print each tick details in event handler method, but please help me how can we pass this tick details to other program which will use this details to calculate as per my strategy. Please try to provide sample code for this
@radharani1306 you can pass the tick details to other program using http or ajax or save in a common place like a db and let the other program poll the db to retrieve the data. If you are using the same language to develop as your websocket language, you can pass the tick data to a method or object of a class which will be called per tick basis.
gaurav_ch, I am writing standalone program in which we cannot use ajax. The idea of db looks good. Can you please give me any sample code to store data in websocket and another program polling to get data.
You need to set
kws.connect(threaded=True)
and send tick value to other thread for calculation.I am writing standalone program in which we cannot use ajax.
The idea of db looks good. Can you please give me any sample code to store data in websocket and another program polling to get data.