Skip to content

MapFilePrimaryExchangeProvider

QuantConnect.Data.Auxiliary.MapFilePrimaryExchangeProvider

MapFilePrimaryExchangeProvider(
    map_file_provider: IMapFileProvider,
)

Bases: Object, IPrimaryExchangeProvider

Implementation of IPrimaryExchangeProvider from map files.

Constructor for Primary Exchange Provider from MapFiles

Parameters:

Name Type Description Default
map_file_provider IMapFileProvider

MapFile to use

required

get_primary_exchange

get_primary_exchange(
    security_identifier: SecurityIdentifier,
) -> Exchange

Gets the primary exchange for a given security identifier

Parameters:

Name Type Description Default
security_identifier SecurityIdentifier

The security identifier to get the primary exchange for

required

Returns:

Type Description
Exchange

Returns the primary exchange or null if not found.