0

I generated my trade system with IB API and C#.

I'm wondering whether is there a function to get the open/filled orders' orderId?

David
  • 17
  • 3

1 Answers1

0

The IBApi.EClient.reqOpenOrders method allows to obtain all active orders submitted by the client application

 client.reqOpenOrders();

or

  client.reqAllOpenOrders();

results will be received in EWrapper with orderId and permId

void openOrder(int orderId, Contract contract, Order order, OrderState orderState);

in the end of execution you will hit void openOrderEnd(); method in your wrapper

documentation: https://interactivebrokers.github.io/tws-api/open_orders.html

danigitman
  • 730
  • 8
  • 11