Lean  $LEAN_TAG$
QuantConnect.Lean.Engine.DataFeeds.DataQueueHandlerManager Class Reference

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

Inheritance diagram for QuantConnect.Lean.Engine.DataFeeds.DataQueueHandlerManager:
[legend]

Public Member Functions

IEnumerator< BaseDataSubscribe (SubscriptionDataConfig dataConfig, EventHandler newDataAvailableHandler)
 Subscribe to the specified configuration More...
 
virtual void Unsubscribe (SubscriptionDataConfig dataConfig)
 Removes the specified configuration More...
 
void SetJob (LiveNodePacket job)
 Sets the job we're subscribing for More...
 
void Dispose ()
 Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. More...
 
IEnumerable< SymbolLookupSymbols (Symbol symbol, bool includeExpired, string securityCurrency=null)
 Method returns a collection of Symbols that are available at the data source. More...
 
bool CanPerformSelection ()
 Returns whether selection can take place or not. More...
 

Public Attributes

bool HasUniverseProvider => DataHandlers.OfType<IDataQueueUniverseProvider>().Any()
 True if the composite queue handler has any IDataQueueUniverseProvider instance More...
 
bool IsConnected => true
 Returns whether the data provider is connected More...
 

Protected Member Functions

void InitializeFrontierTimeProvider ()
 Creates the frontier time provider instance More...
 

Properties

List< IDataQueueHandlerDataHandlers = new() [get]
 Collection of data queue handles being used More...
 
- Properties inherited from QuantConnect.Interfaces.IDataQueueHandler
bool IsConnected [get]
 Returns whether the data provider is connected More...
 

Events

EventHandler< SubscriptionDataConfigUnsupportedConfiguration
 Event triggered when an unsupported configuration is detected More...
 

Detailed Description

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

Definition at line 32 of file DataQueueHandlerManager.cs.

Member Function Documentation

◆ Subscribe()

IEnumerator<BaseData> QuantConnect.Lean.Engine.DataFeeds.DataQueueHandlerManager.Subscribe ( SubscriptionDataConfig  dataConfig,
EventHandler  newDataAvailableHandler 
)

Subscribe to the specified configuration

Parameters
dataConfigdefines the parameters to subscribe to a data feed
newDataAvailableHandlerhandler to be fired on new data available
Returns
The new enumerator for this subscription request

Implements QuantConnect.Interfaces.IDataQueueHandler.

Definition at line 59 of file DataQueueHandlerManager.cs.

Here is the call graph for this function:

◆ Unsubscribe()

virtual void QuantConnect.Lean.Engine.DataFeeds.DataQueueHandlerManager.Unsubscribe ( SubscriptionDataConfig  dataConfig)
virtual

Removes the specified configuration

Parameters
dataConfigSubscription config to be removed

Implements QuantConnect.Interfaces.IDataQueueHandler.

Definition at line 115 of file DataQueueHandlerManager.cs.

◆ SetJob()

void QuantConnect.Lean.Engine.DataFeeds.DataQueueHandlerManager.SetJob ( LiveNodePacket  job)

Sets the job we're subscribing for

Parameters
jobJob we're subscribing for

Implements QuantConnect.Interfaces.IDataQueueHandler.

Definition at line 134 of file DataQueueHandlerManager.cs.

Here is the call graph for this function:

◆ Dispose()

void QuantConnect.Lean.Engine.DataFeeds.DataQueueHandlerManager.Dispose ( )

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

Definition at line 157 of file DataQueueHandlerManager.cs.

◆ LookupSymbols()

IEnumerable<Symbol> QuantConnect.Lean.Engine.DataFeeds.DataQueueHandlerManager.LookupSymbols ( Symbol  symbol,
bool  includeExpired,
string  securityCurrency = null 
)

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

Parameters
symbolSymbol to lookup
includeExpiredInclude expired contracts
securityCurrencyExpected security currency(if any)
Returns
Enumerable of Symbols, that are associated with the provided Symbol

Implements QuantConnect.Interfaces.IDataQueueUniverseProvider.

Definition at line 172 of file DataQueueHandlerManager.cs.

◆ CanPerformSelection()

bool QuantConnect.Lean.Engine.DataFeeds.DataQueueHandlerManager.CanPerformSelection ( )

Returns whether selection can take place or not.

This is useful to avoid a selection taking place during invalid times, for example IB reset times or when not connected, because if allowed selection would fail since IB isn't running and would kill the algorithm

Returns
True if selection can take place

Implements QuantConnect.Interfaces.IDataQueueUniverseProvider.

Definition at line 191 of file DataQueueHandlerManager.cs.

◆ InitializeFrontierTimeProvider()

void QuantConnect.Lean.Engine.DataFeeds.DataQueueHandlerManager.InitializeFrontierTimeProvider ( )
protected

Creates the frontier time provider instance

Protected for testing purposes

Definition at line 200 of file DataQueueHandlerManager.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ HasUniverseProvider

bool QuantConnect.Lean.Engine.DataFeeds.DataQueueHandlerManager.HasUniverseProvider => DataHandlers.OfType<IDataQueueUniverseProvider>().Any()

True if the composite queue handler has any IDataQueueUniverseProvider instance

Definition at line 46 of file DataQueueHandlerManager.cs.

◆ IsConnected

bool QuantConnect.Lean.Engine.DataFeeds.DataQueueHandlerManager.IsConnected => true

Returns whether the data provider is connected

Returns
true if the data provider is connected

Definition at line 152 of file DataQueueHandlerManager.cs.

Property Documentation

◆ DataHandlers

List<IDataQueueHandler> QuantConnect.Lean.Engine.DataFeeds.DataQueueHandlerManager.DataHandlers = new()
getprotected

Collection of data queue handles being used

Protected for testing purposes

Definition at line 41 of file DataQueueHandlerManager.cs.

Event Documentation

◆ UnsupportedConfiguration

EventHandler<SubscriptionDataConfig> QuantConnect.Lean.Engine.DataFeeds.DataQueueHandlerManager.UnsupportedConfiguration

Event triggered when an unsupported configuration is detected

Definition at line 51 of file DataQueueHandlerManager.cs.


The documentation for this class was generated from the following file: