How to retrieve orders status with ibkr api?

Hi,

i want to retrieve all open orders status from my account with ibkr api.
In the documentation i found this:

class TestClient(EClient):
def __init__(self, wrapper):
EClient.__init__(self, wrapper)

@iswrapper
def openOrder(self, orderId, contract, order, orderState):
print("openOrder. orderId:", orderId, "contract:", contract, "order:", order, "orderState:", orderState)

@iswrapper
def orderStatus(self, orderId, status, filled, remaining, avgFillPrice, permId, parentId, lastFillPrice, clientId, whyHeld, mktCapPrice):
print("orderStatus. orderId:", orderId, "status:", status, "filled:", filled, "remaining:", remaining, "avgFillPrice:", avgFillPrice, "permId:", permId, "parentId:", parentId, "lastFillPrice:", lastFillPrice, "clientId:", clientId, "whyHeld:", whyHeld, "mktCapPrice:", mktCapPrice)

@iswrapper
def nextValidId(self, orderId):
self.start()

def start(self):
self.reqAllOpenOrders()

class TestWrapper(wrapper.EWrapper):
def __init__(self):
wrapper.EWrapper.__init__(self)

app = TestClient(TestWrapper())
app.connect("127.0.0.1", 7497, 0)
app.run()

How do you call the function reqAllOpenOrders() from another class in python ?

Any help, thank you.


Thank you
 
Found, i was looking for something that i have already done when placing an order, it returns the order status.
i close this thread.
Thank you
 
Back
Top