Closed jaredvacanti closed 6 years ago
It gives a cleaner design, with the IB class containing no state of its own and just coordinating between client and wrapper. Otherwise it would have been one giant class with everything in it.
Also, directly inheriting from Wrapper and Client pulls in all the request and wrapper methods (around 150?). All of them useless to the user of the IB class. And what is worse, the method names would clash with what I want to use for IB. For example accountSummary is a wrapper method but I want it to return a list of account values.
So composition is used to keep a clean namespace and the freedom to choose any method name.
Is there a functional reason why the switch was made from sub-classing directly to storing in attributes?
ib_insync:
vs the standard ibapi:
Is there a reason that depends on the
asyncio
integration?