¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

reqOpenOrders() returns none


Python1382
 

Hi,

My TWS has a number of open orders but when I run self.reqOpenOrders() it returns none. What might I be doing wrong? I can use self.placeOrder() to place an order so I know I'm connected to the IB. I am using Python.

Thanks


 

How did the orders in TWS get created? Manually in TWS or by a different client?

You might want to read up on the concept of "Master Client" and "Client 0" as described in the chapter. You can also make a "super client" (my term) when you configure the Master Client Id as "0".

The background is that clients get only information about the orders they placed themselves. The exception are the Master Client (which can receive details from all clients) and Client "0" (which can receive details from orders placed manually in TWS).

´³¨¹°ù²µ±ð²Ô


Python1382
 

The client that placed an order was asked to return the open contracts a few minutes later (the contracts were present in TWS but the code returned none).?

Your comment explains why the orders I had in TWS from an earlier client were not viewable (good to know).


Python1382
 

I changed from what I am going to refer (possibly incorrectly) to as the client approach to the wrapper approach and now I can see what I want. Thanks for your response.