I want to get the status of my previous orders. I have the following simple code but I only get True/False values. Here is my code:
from ib.opt import Connection, message
tws_conn = Connection.create(port=7497, clientId=999)
tws_conn.connect()
def acct_update(msg):
print msg
tws_conn.register(acct_update, message.openOrder)
tws_conn.register(acct_update, message.orderStatus)
here is the output:
>>> from ib.opt import Connection, message
>>>
>>> tws_conn = Connection.create(port=7497, clientId=999)
>>> tws_conn.connect()
Server Version: 76
TWS Time at connection:20161021 18:53:42 EST
True
>>>
>>> def acct_update(msg):
... print msg
...
>>> tws_conn.register(acct_update, message.openOrder)
True
>>> tws_conn.register(acct_update, message.orderStatus)
True
>>>
>>>
How can I get the list of open Orders? and how can I get the status of an individual order?
Thanks.