I was able to make your code work with some modification and got an education in abstract classes in the process. I almost forgot C++ rules.
But I have two questions regarding that:
(1) I am still not able to save the position information in a variable
(2) reqAccountUpdates seems updates account information every 3 min (based on a google group thread). How do I make it update only once and stop.
Code:
def updatePortfolio(self, contract, position, marketPrice, marketValue, averageCost, unrealizedPNL, realizedPNL, accountName):
self.myvariable = position
Code:
def cxlAccountUpdates(self):
self.connection.reqAccountUpdates(False,"DU666")
PM me. I will write it for you