Skip to content

IBrokerageFactory

QuantConnect.Interfaces.IBrokerageFactory

Bases: IDisposable

Defines factory types for brokerages. Every IBrokerage is expected to also implement an IBrokerageFactory.

brokerage_type

brokerage_type: Type

Gets the type of brokerage produced by this factory

brokerage_data

brokerage_data: Dictionary[str, str]

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

create_brokerage

create_brokerage(
    job: LiveNodePacket, algorithm: IAlgorithm
) -> IBrokerage

Creates a new IBrokerage instance

Parameters:

Name Type Description Default
job LiveNodePacket

The job packet to create the brokerage for

required
algorithm IAlgorithm

The algorithm instance

required

Returns:

Type Description
IBrokerage

A new brokerage instance.

create_brokerage_message_handler

create_brokerage_message_handler(
    algorithm: IAlgorithm,
    job: AlgorithmNodePacket,
    api: IApi,
) -> IBrokerageMessageHandler

Gets a brokerage message handler

get_brokerage_model

get_brokerage_model(
    order_provider: IOrderProvider,
) -> IBrokerageModel

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

Parameters:

Name Type Description Default
order_provider IOrderProvider

The order provider

required