From:[email protected] <[email protected]> On Behalf Of 闯ü谤驳别苍 Reinold via groups.io Sent: Friday, 15 July 2022 1:02 PM To:[email protected] Subject: Re: [TWS API] updateAccountValue callbacks received but not accountDownloadEnd
?
Details depend on your application architecture, your framework(s), and to some degree the programming language you use.
In the simplest case you could use a model (as in Model-View-Controller) with read-only fields for the account values you are interested in. Callbacks from the initial request and from ongoing incremental updates simply change the corresponding fields in the model. The various client parts read the most recent value from the model when they need a value.
In case you can use "Observable" data objects or some kind of "Data Binding" framework for fields in your model, updates from TWS API callbacks can trigger chains of notifications and method calls in your client. That can work in single-threaded and multi-threaded designs.
I assume when you mention "thread event object" you refer to Python. I am not fluent enough in Python to give you concrete advice and "thread event objects" may very well all you need. But there are Python libraries and frameworks available that implement "observable patterns" or more general "data binding" services that may provide more features and more convenient APIs with less programming effort.