Lean.Brokerages.InteractiveBrokers
Lean.Brokerages.InteractiveBrokers copied to clipboard
Open Order Time Not Set
Expected Behavior
When LEAN fetches an open order, we get the time is was recorded by IB.
Actual Behavior
The order timestamp is DateTime.MinValue.
Potential Solution
Reproducing the Problem
Open Limit Order for MES, for example. Deploy algorithm to IB.
2024-06-24T22:10:23.8663356Z TRACE:: InteractiveBrokersBrokerage.HandleOpenOrder(): OrderId: -2, Contract: FUT MES USD CME, OrderStatus: Submitted
2024-06-24T22:10:23.8762989Z ERROR:: InteractiveBrokersBrokerage.HandleOpenOrder(): Unable to locate order with BrokerageID -2
2024-06-24T22:10:23.9069760Z TRACE:: InteractiveBrokersBrokerage.HandleOrderStatusUpdates(): OrderId: -2, Status: Submitted, Filled: 0, Remaining: 1, AverageFillPrice: 0, PermId: 2129007122, ParentId: 0, LastFillPrice: 0, ClientId: 0, WhyHeld: ,MktCapPrice: 0
2024-06-24T22:10:23.9070630Z ERROR:: InteractiveBrokersBrokerage.HandleOrderStatusUpdates(): Unable to locate order with BrokerageID -2
Checklist
- [x] I have completely filled out this template
- [x] I have confirmed that this issue exists on the current
masterbranch - [x] I have confirmed that this is not a duplicate issue by searching issues
- [x] I have provided detailed steps to reproduce the issue
This is a limitation of the IB API, this information is currently not available
Could you be more specific regarding the limitation? If I query endpoint /iserver/account/orders, it provides lastExecutionTime, which is much better than 0000-12-31 19:36:45. Reference: https://www.interactivebrokers.eu/campus/ibkr-api-page/webapi-doc/#monitoring-live-orders-33