Lean  $LEAN_TAG$
QuantConnect.Brokerages.BrokerageFactory Class Referenceabstract

Provides a base implementation of IBrokerageFactory that provides a helper for reading data from a job's brokerage data dictionary More...

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

Public Member Functions

abstract void Dispose ()
 Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. More...
 
abstract IBrokerageModel GetBrokerageModel (IOrderProvider orderProvider)
 Gets a brokerage model that can be used to model this brokerage's unique behaviors More...
 
abstract IBrokerage CreateBrokerage (LiveNodePacket job, IAlgorithm algorithm)
 Creates a new IBrokerage instance More...
 
virtual IBrokerageMessageHandler CreateBrokerageMessageHandler (IAlgorithm algorithm, AlgorithmNodePacket job, IApi api)
 Gets a brokerage message handler More...
 

Protected Member Functions

 BrokerageFactory (Type brokerageType)
 Initializes a new instance of the BrokerageFactory class for the specified brokerageType More...
 

Static Protected Member Functions

static T Read< T > (IReadOnlyDictionary< string, string > brokerageData, string key, ICollection< string > errors)
 Reads a value from the brokerage data, adding an error if the key is not found More...
 

Properties

Type BrokerageType [get]
 Gets the type of brokerage produced by this factory More...
 
abstract Dictionary< string, string > BrokerageData [get]
 Gets the brokerage data required to run the brokerage from configuration/disk More...
 
- Properties inherited from QuantConnect.Interfaces.IBrokerageFactory
Type BrokerageType [get]
 Gets the type of brokerage produced by this factory More...
 
Dictionary< string, string > BrokerageData [get]
 Gets the brokerage data required to run the brokerage from configuration/disk More...
 

Detailed Description

Provides a base implementation of IBrokerageFactory that provides a helper for reading data from a job's brokerage data dictionary

Definition at line 27 of file BrokerageFactory.cs.

Constructor & Destructor Documentation

◆ BrokerageFactory()

QuantConnect.Brokerages.BrokerageFactory.BrokerageFactory ( Type  brokerageType)
protected

Initializes a new instance of the BrokerageFactory class for the specified brokerageType

Parameters
brokerageTypeThe type of brokerage created by this factory

Definition at line 80 of file BrokerageFactory.cs.

Member Function Documentation

◆ Dispose()

abstract void QuantConnect.Brokerages.BrokerageFactory.Dispose ( )
pure virtual

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

<filterpriority>2</filterpriority>

Implemented in QuantConnect.Brokerages.Paper.PaperBrokerageFactory, and QuantConnect.Brokerages.Backtesting.BacktestingBrokerageFactory.

◆ GetBrokerageModel()

abstract IBrokerageModel QuantConnect.Brokerages.BrokerageFactory.GetBrokerageModel ( IOrderProvider  orderProvider)
pure virtual

Gets a brokerage model that can be used to model this brokerage's unique behaviors

Parameters
orderProviderThe order provider

Implements QuantConnect.Interfaces.IBrokerageFactory.

Implemented in QuantConnect.Brokerages.Paper.PaperBrokerageFactory, and QuantConnect.Brokerages.Backtesting.BacktestingBrokerageFactory.

◆ CreateBrokerage()

abstract IBrokerage QuantConnect.Brokerages.BrokerageFactory.CreateBrokerage ( LiveNodePacket  job,
IAlgorithm  algorithm 
)
pure virtual

Creates a new IBrokerage instance

Parameters
jobThe job packet to create the brokerage for
algorithmThe algorithm instance
Returns
A new brokerage instance

Implements QuantConnect.Interfaces.IBrokerageFactory.

Implemented in QuantConnect.Brokerages.Paper.PaperBrokerageFactory, and QuantConnect.Brokerages.Backtesting.BacktestingBrokerageFactory.

◆ CreateBrokerageMessageHandler()

virtual IBrokerageMessageHandler QuantConnect.Brokerages.BrokerageFactory.CreateBrokerageMessageHandler ( IAlgorithm  algorithm,
AlgorithmNodePacket  job,
IApi  api 
)
virtual

Gets a brokerage message handler

Implements QuantConnect.Interfaces.IBrokerageFactory.

Definition at line 71 of file BrokerageFactory.cs.

◆ Read< T >()

static T QuantConnect.Brokerages.BrokerageFactory.Read< T > ( IReadOnlyDictionary< string, string >  brokerageData,
string  key,
ICollection< string >  errors 
)
staticprotected

Reads a value from the brokerage data, adding an error if the key is not found

Type Constraints
T :IConvertible 

Definition at line 88 of file BrokerageFactory.cs.

Property Documentation

◆ BrokerageType

Type QuantConnect.Brokerages.BrokerageFactory.BrokerageType
get

Gets the type of brokerage produced by this factory

Definition at line 41 of file BrokerageFactory.cs.

◆ BrokerageData

abstract Dictionary<string, string> QuantConnect.Brokerages.BrokerageFactory.BrokerageData
get

Gets the brokerage data required to run the brokerage from configuration/disk

The implementation of this property will create the brokerage data dictionary required for running live jobs. See IJobQueueHandler.NextJob

Definition at line 52 of file BrokerageFactory.cs.


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