It looks like you're new here. If you want to get involved, click one of these buttons!
.Net API client
.Net / VBA / Excel (3rd party)
Algorithms and Strategies
Mobile and Desktop apps
Market data (WebSockets)
In this Discussion
kws.connect(threaded=True) not working
I store the ticks of a stock in a dataframe and pass this dataframe to a thread where it runs logic on dataframe to decide to place order or not.
As suggested in one of the discussions that I read, if I pass threaded=True to kws.connect, my script ends immediately.
But when I don't pass it and don't change kws.connect() script runs fine and thread also works..
why threaded=True didn't work as expected?
Can you paste the complete stacktrace and code here?
kws.connect(threaded=True) runs ticker in a separate thread
That means you ll have to block the main thread in some way.
If you need to process dataframe in a separate thread, you dont need to run ticker in threaded mode. Create a new thread inside on_ticks callback and process the ticks.
Thanks Zartimus. That solves the dilemma. I am storing the ticks in a dataframe, creating a new thread inside on_ticks and passing dataframe to this thread.
This discussion has been closed.