我想獲取我以前訂單的狀態。我有以下簡單的代碼,但我只獲得True/False值。這裏是我的代碼:IBpy獲取訂單狀態更新
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)
這裏是輸出:
>>> 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
>>>
>>>
我怎樣才能打開訂單列表?以及如何獲得單個訂單的狀態?
謝謝。