Skip to content

BrokerageModel

QuantConnect.Brokerages.BrokerageModel

Bases: Object

Provides factory method for creating an IBrokerageModel from the BrokerageName enum

create

create(
    order_provider: IOrderProvider,
    brokerage: BrokerageName,
    account_type: AccountType,
) -> IBrokerageModel

Creates a new IBrokerageModel for the specified BrokerageName

Parameters:

Name Type Description Default
order_provider IOrderProvider

The order provider

required
brokerage BrokerageName

The name of the brokerage

required
account_type AccountType

The account type

required

Returns:

Type Description
IBrokerageModel

The model for the specified brokerage.

get_brokerage_name

get_brokerage_name(
    brokerage_model: IBrokerageModel,
) -> BrokerageName

Gets the corresponding BrokerageName for the specified IBrokerageModel

Parameters:

Name Type Description Default
brokerage_model IBrokerageModel

The brokerage model

required

Returns:

Type Description
BrokerageName

The BrokerageName for the specified brokerage model.