Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open Order Time Not Set #117

Open
4 tasks done
AlexCatarino opened this issue Jun 25, 2024 · 2 comments
Open
4 tasks done

Open Order Time Not Set #117

AlexCatarino opened this issue Jun 25, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@AlexCatarino
Copy link
Member

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.

Captura de ecrã 2024-06-25 210631

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

  • I have completely filled out this template
  • I have confirmed that this issue exists on the current master branch
  • I have confirmed that this is not a duplicate issue by searching issues
  • I have provided detailed steps to reproduce the issue
@Martin-Molinero Martin-Molinero added the bug Something isn't working label Jun 25, 2024
@Martin-Molinero
Copy link
Member

This is a limitation of the IB API, this information is currently not available

@MaxRepin
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants