Skip to content

IDataFeed

QuantConnect.Lean.Engine.DataFeeds.IDataFeed

Datafeed interface for creating custom datafeed sources.

is_active

is_active: bool

Public flag indicator that the thread is still busy.

create_subscription

create_subscription(
    request: SubscriptionRequest,
) -> Subscription

Creates a new subscription to provide data for the specified security.

Parameters:

Name Type Description Default
request SubscriptionRequest

Defines the subscription to be added, including start/end times the universe and security

required

Returns:

Type Description
Subscription

The created Subscription if successful, null otherwise.

exit

exit() -> None

External controller calls to signal a terminate of the thread.

initialize

initialize(
    algorithm: IAlgorithm,
    job: AlgorithmNodePacket,
    result_handler: IResultHandler,
    map_file_provider: IMapFileProvider,
    factor_file_provider: IFactorFileProvider,
    data_provider: IDataProvider,
    subscription_manager: IDataFeedSubscriptionManager,
    data_feed_time_provider: IDataFeedTimeProvider,
    data_channel_provider: IDataChannelProvider,
) -> None

Initializes the data feed for the specified job and algorithm

remove_subscription

remove_subscription(subscription: Subscription) -> None

Removes the subscription from the data feed, if it exists

Parameters:

Name Type Description Default
subscription Subscription

The subscription to remove

required