Lean  $LEAN_TAG$
QuantConnect.Lean.Engine.TransactionHandlers.ITransactionHandler Interface Reference

Transaction handlers define how the transactions are processed and set the order fill information. The pass this information back to the algorithm portfolio and ensure the cash and portfolio are synchronized. More...

Inheritance diagram for QuantConnect.Lean.Engine.TransactionHandlers.ITransactionHandler:
[legend]

Public Member Functions

void Initialize (IAlgorithm algorithm, IBrokerage brokerage, IResultHandler resultHandler)
 Initializes the transaction handler for the specified algorithm using the specified brokerage implementation More...
 
void Exit ()
 Signal a end of thread request to stop montioring the transactions. More...
 
void ProcessSynchronousEvents ()
 Process any synchronous events from the primary algorithm thread. More...
 
void AddOpenOrder (Order order, IAlgorithm algorithm)
 Register an already open Order More...
 
- Public Member Functions inherited from QuantConnect.Securities.IOrderProcessor
OrderTicket Process (OrderRequest request)
 Adds the specified order to be processed More...
 
- Public Member Functions inherited from QuantConnect.Securities.IOrderProvider
Order GetOrderById (int orderId)
 Get the order by its id More...
 
List< OrderGetOrdersByBrokerageId (string brokerageId)
 Gets the Lean orders by its brokerage id More...
 
IEnumerable< OrderTicketGetOrderTickets (Func< OrderTicket, bool > filter=null)
 Gets and enumerable of OrderTicket matching the specified filter More...
 
IEnumerable< OrderTicketGetOpenOrderTickets (Func< OrderTicket, bool > filter=null)
 Gets and enumerable of opened OrderTicket matching the specified filter More...
 
OrderTicket GetOrderTicket (int orderId)
 Gets the order ticket for the specified order id. Returns null if not found More...
 
IEnumerable< OrderGetOrders (Func< Order, bool > filter=null)
 Gets all orders matching the specified filter. Specifying null will return an enumerable of all orders. More...
 
List< OrderGetOpenOrders (Func< Order, bool > filter=null)
 Gets open orders matching the specified filter. Specifying null will return an enumerable of all open orders. More...
 

Properties

bool IsActive [get]
 Boolean flag indicating the thread is busy. False indicates it is completely finished processing and ready to be terminated. More...
 
ConcurrentDictionary< int, OrderOrders [get]
 Gets the permanent storage for all orders More...
 
IEnumerable< OrderEventOrderEvents [get]
 Gets all order events More...
 
ConcurrentDictionary< int, OrderTicketOrderTickets [get]
 Gets the permanent storage for all order tickets More...
 
- Properties inherited from QuantConnect.Securities.IOrderProvider
int OrdersCount [get]
 Gets the current number of orders that have been processed More...
 

Additional Inherited Members

- Events inherited from QuantConnect.Securities.IOrderEventProvider
EventHandler< OrderEventNewOrderEvent
 Event fired when there is a new OrderEvent More...
 

Detailed Description

Transaction handlers define how the transactions are processed and set the order fill information. The pass this information back to the algorithm portfolio and ensure the cash and portfolio are synchronized.

Definition at line 32 of file ITransactionHandler.cs.

Member Function Documentation

◆ Initialize()

void QuantConnect.Lean.Engine.TransactionHandlers.ITransactionHandler.Initialize ( IAlgorithm  algorithm,
IBrokerage  brokerage,
IResultHandler  resultHandler 
)

Initializes the transaction handler for the specified algorithm using the specified brokerage implementation

Implemented in QuantConnect.Lean.Engine.TransactionHandlers.BrokerageTransactionHandler, and QuantConnect.Lean.Engine.TransactionHandlers.BacktestingTransactionHandler.

◆ Exit()

void QuantConnect.Lean.Engine.TransactionHandlers.ITransactionHandler.Exit ( )

Signal a end of thread request to stop montioring the transactions.

Implemented in QuantConnect.Lean.Engine.TransactionHandlers.BrokerageTransactionHandler.

◆ ProcessSynchronousEvents()

void QuantConnect.Lean.Engine.TransactionHandlers.ITransactionHandler.ProcessSynchronousEvents ( )

◆ AddOpenOrder()

void QuantConnect.Lean.Engine.TransactionHandlers.ITransactionHandler.AddOpenOrder ( Order  order,
IAlgorithm  algorithm 
)

Register an already open Order

Implemented in QuantConnect.Lean.Engine.TransactionHandlers.BrokerageTransactionHandler.

Property Documentation

◆ IsActive

bool QuantConnect.Lean.Engine.TransactionHandlers.ITransactionHandler.IsActive
get

Boolean flag indicating the thread is busy. False indicates it is completely finished processing and ready to be terminated.

Definition at line 39 of file ITransactionHandler.cs.

◆ Orders

ConcurrentDictionary<int, Order> QuantConnect.Lean.Engine.TransactionHandlers.ITransactionHandler.Orders
get

Gets the permanent storage for all orders

Definition at line 47 of file ITransactionHandler.cs.

◆ OrderEvents

IEnumerable<OrderEvent> QuantConnect.Lean.Engine.TransactionHandlers.ITransactionHandler.OrderEvents
get

Gets all order events

Definition at line 54 of file ITransactionHandler.cs.

◆ OrderTickets

ConcurrentDictionary<int, OrderTicket> QuantConnect.Lean.Engine.TransactionHandlers.ITransactionHandler.OrderTickets
get

Gets the permanent storage for all order tickets

Definition at line 60 of file ITransactionHandler.cs.


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