Lean  $LEAN_TAG$
QuantConnect.Brokerages.DefaultBrokerageMessageHandler Class Reference

Provides a default implementation o IBrokerageMessageHandler that will forward messages as follows: Information -> IResultHandler.Debug Warning -> IResultHandler.Error && IApi.SendUserEmail Error -> IResultHandler.Error && IAlgorithm.RunTimeError More...

Inheritance diagram for QuantConnect.Brokerages.DefaultBrokerageMessageHandler:
[legend]

Public Member Functions

 DefaultBrokerageMessageHandler (IAlgorithm algorithm, TimeSpan? initialDelay=null, TimeSpan? openThreshold=null)
 Initializes a new instance of the DefaultBrokerageMessageHandler class More...
 
 DefaultBrokerageMessageHandler (IAlgorithm algorithm, AlgorithmNodePacket job, IApi api, TimeSpan? initialDelay=null, TimeSpan? openThreshold=null)
 Initializes a new instance of the DefaultBrokerageMessageHandler class More...
 
void HandleMessage (BrokerageMessageEvent message)
 Handles the message More...
 
bool HandleOrder (NewBrokerageOrderNotificationEventArgs eventArgs)
 Handles a new order placed manually in the brokerage side More...
 

Detailed Description

Provides a default implementation o IBrokerageMessageHandler that will forward messages as follows: Information -> IResultHandler.Debug Warning -> IResultHandler.Error && IApi.SendUserEmail Error -> IResultHandler.Error && IAlgorithm.RunTimeError

Definition at line 35 of file DefaultBrokerageMessageHandler.cs.

Constructor & Destructor Documentation

◆ DefaultBrokerageMessageHandler() [1/2]

QuantConnect.Brokerages.DefaultBrokerageMessageHandler.DefaultBrokerageMessageHandler ( IAlgorithm  algorithm,
TimeSpan?  initialDelay = null,
TimeSpan?  openThreshold = null 
)

Initializes a new instance of the DefaultBrokerageMessageHandler class

Parameters
algorithmThe running algorithm
initialDelay
openThresholdDefines how long before market open to re-check for brokerage reconnect message

Definition at line 53 of file DefaultBrokerageMessageHandler.cs.

◆ DefaultBrokerageMessageHandler() [2/2]

QuantConnect.Brokerages.DefaultBrokerageMessageHandler.DefaultBrokerageMessageHandler ( IAlgorithm  algorithm,
AlgorithmNodePacket  job,
IApi  api,
TimeSpan?  initialDelay = null,
TimeSpan?  openThreshold = null 
)

Initializes a new instance of the DefaultBrokerageMessageHandler class

Parameters
algorithmThe running algorithm
jobThe job that produced the algorithm
apiThe api for the algorithm
initialDelay
openThresholdDefines how long before market open to re-check for brokerage reconnect message

Definition at line 66 of file DefaultBrokerageMessageHandler.cs.

Member Function Documentation

◆ HandleMessage()

void QuantConnect.Brokerages.DefaultBrokerageMessageHandler.HandleMessage ( BrokerageMessageEvent  message)

Handles the message

Parameters
messageThe message to be handled

Implements QuantConnect.Brokerages.IBrokerageMessageHandler.

Definition at line 78 of file DefaultBrokerageMessageHandler.cs.

Here is the call graph for this function:

◆ HandleOrder()

bool QuantConnect.Brokerages.DefaultBrokerageMessageHandler.HandleOrder ( NewBrokerageOrderNotificationEventArgs  eventArgs)

Handles a new order placed manually in the brokerage side

Parameters
eventArgsThe new order event
Returns
Whether the order should be added to the transaction handler

Implements QuantConnect.Brokerages.IBrokerageMessageHandler.

Definition at line 174 of file DefaultBrokerageMessageHandler.cs.


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