Lean  $LEAN_TAG$
QuantConnect.Lean.Engine.TransactionHandlers.CancelPendingOrders Class Reference

Class used to keep track of CancelPending orders and their original or updated status More...

Public Member Functions

void Set (int orderId, OrderStatus status)
 Adds an order which will be canceled and we want to keep track of it Status in case of fallback More...
 
void UpdateOrRemove (int orderId, OrderStatus newStatus)
 Updates an order that is pending to be canceled. More...
 
void RemoveAndFallback (Order order)
 Removes an order which we failed to cancel and falls back the order Status to previous value More...
 

Public Attributes

int GetCancelPendingOrdersSize => _cancelPendingOrders.Count
 Amount of CancelPending Orders More...
 

Detailed Description

Class used to keep track of CancelPending orders and their original or updated status

Definition at line 23 of file CancelPendingOrders.cs.

Member Function Documentation

◆ Set()

void QuantConnect.Lean.Engine.TransactionHandlers.CancelPendingOrders.Set ( int  orderId,
OrderStatus  status 
)

Adds an order which will be canceled and we want to keep track of it Status in case of fallback

Parameters
orderIdThe order id
statusThe order Status, before the cancel request

Definition at line 37 of file CancelPendingOrders.cs.

Here is the caller graph for this function:

◆ UpdateOrRemove()

void QuantConnect.Lean.Engine.TransactionHandlers.CancelPendingOrders.UpdateOrRemove ( int  orderId,
OrderStatus  newStatus 
)

Updates an order that is pending to be canceled.

Parameters
newStatusThe new status of the order. If its OrderStatus.Canceled or OrderStatus.Filled it will be removed
orderIdThe id of the order

Definition at line 47 of file CancelPendingOrders.cs.

◆ RemoveAndFallback()

void QuantConnect.Lean.Engine.TransactionHandlers.CancelPendingOrders.RemoveAndFallback ( Order  order)

Removes an order which we failed to cancel and falls back the order Status to previous value

Parameters
orderThe order that failed to be canceled

Definition at line 77 of file CancelPendingOrders.cs.

Member Data Documentation

◆ GetCancelPendingOrdersSize

int QuantConnect.Lean.Engine.TransactionHandlers.CancelPendingOrders.GetCancelPendingOrdersSize => _cancelPendingOrders.Count

Amount of CancelPending Orders

Definition at line 30 of file CancelPendingOrders.cs.


The documentation for this class was generated from the following file: