Lean
$LEAN_TAG$
|
This is an implementation of IDataQueueHandler used to handle multiple live datafeeds More...
Public Member Functions | |
DataQueueHandlerManager (IAlgorithmSettings settings) | |
Creates a new instance More... | |
IEnumerator< BaseData > | Subscribe (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< Symbol > | LookupSymbols (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 | |
virtual ITimeProvider | InitializeFrontierTimeProvider () |
Creates the frontier time provider instance More... | |
Properties | |
ITimeProvider | FrontierTimeProvider [get, set] |
Frontier time provider to use More... | |
List< IDataQueueHandler > | DataHandlers = new() [get, set] |
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< SubscriptionDataConfig > | UnsupportedConfiguration |
Event triggered when an unsupported configuration is detected More... | |
This is an implementation of IDataQueueHandler used to handle multiple live datafeeds
Definition at line 33 of file DataQueueHandlerManager.cs.
QuantConnect.Lean.Engine.DataFeeds.DataQueueHandlerManager.DataQueueHandlerManager | ( | IAlgorithmSettings | settings | ) |
Creates a new instance
Definition at line 41 of file DataQueueHandlerManager.cs.
IEnumerator<BaseData> QuantConnect.Lean.Engine.DataFeeds.DataQueueHandlerManager.Subscribe | ( | SubscriptionDataConfig | dataConfig, |
EventHandler | newDataAvailableHandler | ||
) |
Subscribe to the specified configuration
dataConfig | defines the parameters to subscribe to a data feed |
newDataAvailableHandler | handler to be fired on new data available |
Implements QuantConnect.Interfaces.IDataQueueHandler.
Definition at line 74 of file DataQueueHandlerManager.cs.
|
virtual |
Removes the specified configuration
dataConfig | Subscription config to be removed |
Implements QuantConnect.Interfaces.IDataQueueHandler.
Definition at line 156 of file DataQueueHandlerManager.cs.
void QuantConnect.Lean.Engine.DataFeeds.DataQueueHandlerManager.SetJob | ( | LiveNodePacket | job | ) |
Sets the job we're subscribing for
job | Job we're subscribing for |
Implements QuantConnect.Interfaces.IDataQueueHandler.
Definition at line 175 of file DataQueueHandlerManager.cs.
void QuantConnect.Lean.Engine.DataFeeds.DataQueueHandlerManager.Dispose | ( | ) |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Definition at line 198 of file DataQueueHandlerManager.cs.
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.
symbol | Symbol to lookup |
includeExpired | Include expired contracts |
securityCurrency | Expected security currency(if any) |
Implements QuantConnect.Interfaces.IDataQueueUniverseProvider.
Definition at line 213 of file DataQueueHandlerManager.cs.
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
Implements QuantConnect.Interfaces.IDataQueueUniverseProvider.
Definition at line 239 of file DataQueueHandlerManager.cs.
|
protectedvirtual |
Creates the frontier time provider instance
Protected for testing purposes
Definition at line 248 of file DataQueueHandlerManager.cs.
bool QuantConnect.Lean.Engine.DataFeeds.DataQueueHandlerManager.HasUniverseProvider => DataHandlers.OfType<IDataQueueUniverseProvider>().Any() |
True if the composite queue handler has any IDataQueueUniverseProvider instance
Definition at line 61 of file DataQueueHandlerManager.cs.
bool QuantConnect.Lean.Engine.DataFeeds.DataQueueHandlerManager.IsConnected => true |
Returns whether the data provider is connected
Definition at line 193 of file DataQueueHandlerManager.cs.
|
getsetprotected |
Frontier time provider to use
Protected for testing purposes
Definition at line 50 of file DataQueueHandlerManager.cs.
|
getsetprotected |
Collection of data queue handles being used
Protected for testing purposes
Definition at line 56 of file DataQueueHandlerManager.cs.
EventHandler<SubscriptionDataConfig> QuantConnect.Lean.Engine.DataFeeds.DataQueueHandlerManager.UnsupportedConfiguration |
Event triggered when an unsupported configuration is detected
Definition at line 66 of file DataQueueHandlerManager.cs.