Monthly Archive for September, 2010

Interactive Brokers Order Listener

Sorry for the long gap on infrastructure lately – I actually have intentions of discussing my production system again (mostly written against Trading Technologies api), but I still do considerable work with Ib’s api and have run into trouble.

All of my prior interfaces with Ib have been for strictly self contained situations. Essentially where the program is placing orders and monitoring messages for the orders it has placed. I am now writing an interface to listen for any orders placed by any application or directly through the TWS interface. It appears I can use the RequestOpenOrders method with a clientId of -1 and receive all open orders at that moment in time, or I can use the RequestAutoOpenOrders to map TWS order messages to my client with a clientId of 0. But it does not appear there is any way to get all order updates from any target without constantly querying the open orders method.

Does anyone have a better way to do this?