Skip to content

DataQueueHandlerManager

QuantConnect.Lean.Engine.DataFeeds.DataQueueHandlerManager

DataQueueHandlerManager(settings: IAlgorithmSettings)

Bases: Object, IDataQueueHandler, IDataQueueUniverseProvider

This is an implementation of IDataQueueHandler used to handle multiple live datafeeds

Creates a new instance

frontier_time_provider

frontier_time_provider: ITimeProvider

Frontier time provider to use

This codeEntityType is protected.

data_handlers

data_handlers: List[IDataQueueHandler]

Collection of data queue handles being used

This codeEntityType is protected.

has_universe_provider

has_universe_provider: bool

True if the composite queue handler has any IDataQueueUniverseProvider instance

unsupported_configuration

unsupported_configuration: _EventContainer[
    Callable[[Object, SubscriptionDataConfig], Any], Any
]

Event triggered when an unsupported configuration is detected

is_connected

is_connected: bool

Returns whether the data provider is connected

can_perform_selection

can_perform_selection() -> bool

Returns whether selection can take place or not.

Returns:

Type Description
bool

True if selection can take place.

dispose

dispose() -> None

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

initialize_frontier_time_provider

initialize_frontier_time_provider() -> ITimeProvider

Creates the frontier time provider instance

This codeEntityType is protected.

lookup_symbols

lookup_symbols(
    symbol: Union[Symbol, str, BaseContract],
    include_expired: bool,
    security_currency: str = None,
) -> Iterable[Symbol]

Method returns a collection of Symbols that are available at the data source.

Parameters:

Name Type Description Default
symbol Union[Symbol, str, BaseContract]

Symbol to lookup

required
include_expired bool

Include expired contracts

required
security_currency str

Expected security currency(if any)

None

Returns:

Type Description
Iterable[Symbol]

Enumerable of Symbols, that are associated with the provided Symbol.

set_job

set_job(job: LiveNodePacket) -> None

Sets the job we're subscribing for

Parameters:

Name Type Description Default
job LiveNodePacket

Job we're subscribing for

required

subscribe

subscribe(
    data_config: SubscriptionDataConfig,
    new_data_available_handler: Callable[
        [Object, EventArgs], Any
    ],
) -> IEnumerator[BaseData]

Subscribe to the specified configuration

Parameters:

Name Type Description Default
data_config SubscriptionDataConfig

defines the parameters to subscribe to a data feed

required
new_data_available_handler Callable[[Object, EventArgs], Any]

handler to be fired on new data available

required

Returns:

Type Description
IEnumerator[BaseData]

The new enumerator for this subscription request.

unsubscribe

unsubscribe(data_config: SubscriptionDataConfig) -> None

Removes the specified configuration

Parameters:

Name Type Description Default
data_config SubscriptionDataConfig

Subscription config to be removed

required