QuantConnect / Lean.Brokerages.InteractiveBrokers

InteractiveBrokers Brokerage Plugin
Apache License 2.0
31 stars 20 forks source link

Add OrderStatus when fetching open orders at BrokerageSetup #78

Closed se-l closed 1 year ago

se-l commented 1 year ago

Fixes having only orderStatus=None at algo start for open orders.

Description

GetOpenOrders in BrokerageSetupHandler returned orders without status. Modified GetOpenOrdersInternal to also populate the OrderStatus when fetching open orders from brokerage.

Related Issue

Closes https://github.com/QuantConnect/Lean.Brokerages.InteractiveBrokers/issues/77

Motivation and Context

Fixes having only orderStatus=None at algo start for open orders.

Requires Documentation Change

No

How Has This Been Tested?

Fetched open limit orders from Live Paper Trading account and ensured orderTickets have Status=OrderStatus.Submitted after initialization. Previously, None. Tested with fix IB Gateway version: 10.192b and TWS 10.24.1c

Types of changes

Checklist: