I did the following but it didn't work at all:
z = list( tws_conn.reqAccountUpdates(True,'DU15211') )
Any suggestions ?
def updateAccountValue(self, key, value, currency, accountName):
showmessage('updateAccountValue', vars())
updateAccountValue(self, key, value, currency, accountName):
self._store_account_value.append(vars())
import time
setattr(tws_conn, "_store_account_value", [])
tws_conn.reqAccountUpdates(True,'DU15211')
## after waiting for a while - use the accountDownloadEnd to do this properly
time.sleep(30)
print tws_conn._store_account_value
import time setattr(tws_conn, "_store_account_value", []) tws_conn.reqAccountUpdates(True,'DU15211') ## after waiting for a while - use the accountDownloadEnd to do this properly time.sleep(30) print tws_conn._store_account_value
i updated the github gist to display accountUpdates
gist.github.com/audubon/b14eeda1c2cad704b333
Is this really supposed to work as you have coded ? I get an empty array on the print statement.
Like I said I don't use Ibpy, so this was a punt. If you're willing to switch to swigibpy then you can, as I said, get a complete working example from here http://qoppac.blogspot.co.uk/2014/05/getting-accounting-data-out-of.html. That also means if you have any other problems then I can probably help with them.
Otherwise, you're on your own, unless there is someone willing and able to get an ibpy version working.
GAT
I would have used swigibipy but I dont have permission to install it on the machine I am working on.
Is there a way to implement swigibipy without installation ?
No I didn't install IbPy. I am calling it using "import"Not as far as I know. Weird you can install ibpy but not swgibpy
GAT
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.