Skip to content

IDataFeedSubscriptionManager

QuantConnect.Lean.Engine.DataFeeds.IDataFeedSubscriptionManager

DataFeedSubscriptionManager interface will manage the subscriptions for the Data Feed

subscription_added

subscription_added: _EventContainer[
    Callable[[Object, Subscription], Any], Any
]

Event fired when a new subscription is added

subscription_removed

subscription_removed: _EventContainer[
    Callable[[Object, Subscription], Any], Any
]

Event fired when an existing subscription is removed

data_feed_subscriptions

data_feed_subscriptions: SubscriptionCollection

Gets the data feed subscription collection

universe_selection

universe_selection: UniverseSelection

Get the universe selection instance

add_subscription

add_subscription(request: SubscriptionRequest) -> bool

Adds a new Subscription to provide data for the specified security.

Parameters:

Name Type Description Default
request SubscriptionRequest

Defines the SubscriptionRequest to be added

required

Returns:

Type Description
bool

True if the subscription was created and added successfully, false otherwise.

remove_subscription

remove_subscription(
    configuration: SubscriptionDataConfig,
    universe: Universe = None,
) -> bool

Removes the Subscription, if it exists

Parameters:

Name Type Description Default
configuration SubscriptionDataConfig

The SubscriptionDataConfig of the subscription to remove

required
universe Universe

Universe requesting to remove Subscription. Default value, null, will remove all universes

None

Returns:

Type Description
bool

True if the subscription was successfully removed, false otherwise.