I am able to get tick data in my python scripts. But, i am trying to get some data displayed on a webpage using Flask for which i require tick data. Cannot understand how to use websocket connection and flask app together.
I tried below, but obviously it doesn't work as it is already mentioned that - it works only on the main thread.
# Infinite loop on the main thread. Nothing after this will run. # You have to use the pre-defined callbacks to manage subscriptions. kws.connect() ########################### end ticker ########################
You can look to this threading explanation and flask example.