|
Lean
$LEAN_TAG$
|
DataManager will manage the subscriptions for both the DataFeeds and the SubscriptionManager More...
Public Member Functions | |
| DataManager (IDataFeed dataFeed, UniverseSelection universeSelection, IAlgorithm algorithm, ITimeKeeper timeKeeper, MarketHoursDatabase marketHoursDatabase, bool liveMode, IRegisteredSecurityDataTypesProvider registeredTypesProvider, IDataPermissionManager dataPermissionManager) | |
| Creates a new instance of the DataManager More... | |
| void | RemoveAllSubscriptions () |
| Will remove all current Subscription More... | |
| bool | AddSubscription (SubscriptionRequest request) |
| Adds a new Subscription to provide data for the specified security. More... | |
| bool | RemoveSubscription (SubscriptionDataConfig configuration, Universe universe=null) |
| Removes the Subscription, if it exists More... | |
| SubscriptionDataConfig | SubscriptionManagerGetOrAdd (SubscriptionDataConfig newConfig) |
| Gets existing or adds new SubscriptionDataConfig More... | |
| int | SubscriptionManagerCount () |
| Returns the amount of data config subscriptions processed for the SubscriptionManager More... | |
| SubscriptionDataConfig | Add (Type dataType, Symbol symbol, Resolution? resolution=null, bool fillForward=true, bool extendedMarketHours=false, bool isFilteredSubscription=true, bool isInternalFeed=false, bool isCustomData=false, DataNormalizationMode dataNormalizationMode=DataNormalizationMode.Adjusted, DataMappingMode dataMappingMode=DataMappingMode.OpenInterest, uint contractDepthOffset=0) |
| Creates and adds a list of SubscriptionDataConfig for a given symbol and configuration. Can optionally pass in desired subscription data type to use. If the config already existed will return existing instance instead More... | |
| List< SubscriptionDataConfig > | Add (Symbol symbol, Resolution? resolution=null, bool fillForward=true, bool extendedMarketHours=false, bool isFilteredSubscription=true, bool isInternalFeed=false, bool isCustomData=false, List< Tuple< Type, TickType >> subscriptionDataTypes=null, DataNormalizationMode dataNormalizationMode=DataNormalizationMode.Adjusted, DataMappingMode dataMappingMode=DataMappingMode.OpenInterest, uint contractDepthOffset=0) |
| Creates and adds a list of SubscriptionDataConfig for a given symbol and configuration. Can optionally pass in desired subscription data types to use. If the config already existed will return existing instance instead More... | |
| List< Tuple< Type, TickType > > | LookupSubscriptionConfigDataTypes (SecurityType symbolSecurityType, Resolution resolution, bool isCanonical) |
| Get the data feed types for a given SecurityType Resolution More... | |
| List< SubscriptionDataConfig > | GetSubscriptionDataConfigs (Symbol symbol=null, bool includeInternalConfigs=false) |
| Gets a list of all registered SubscriptionDataConfig for a given Symbol More... | |
Properties | |
| SubscriptionCollection | DataFeedSubscriptions [get] |
| Gets the data feed subscription collection More... | |
| IEnumerable< SubscriptionDataConfig > | SubscriptionManagerSubscriptions [get] |
| Gets all the current data config subscriptions that are being processed for the SubscriptionManager More... | |
| Dictionary< SecurityType, List< TickType > > | AvailableDataTypes [get] |
| The different TickType each SecurityType supports More... | |
| UniverseSelection | UniverseSelection [get] |
| Get the universe selection instance More... | |
Properties inherited from QuantConnect.Interfaces.IAlgorithmSubscriptionManager | |
| IEnumerable< SubscriptionDataConfig > | SubscriptionManagerSubscriptions [get] |
| Gets all the current data config subscriptions that are being processed for the SubscriptionManager More... | |
Properties inherited from QuantConnect.Interfaces.ISubscriptionDataConfigService | |
| Dictionary< SecurityType, List< TickType > > | AvailableDataTypes [get] |
| Gets the available data types More... | |
Properties inherited from QuantConnect.Lean.Engine.DataFeeds.IDataFeedSubscriptionManager | |
| SubscriptionCollection | DataFeedSubscriptions [get] |
| Gets the data feed subscription collection More... | |
| UniverseSelection | UniverseSelection [get] |
| Get the universe selection instance More... | |
Properties inherited from QuantConnect.Lean.Engine.DataFeeds.IDataManager | |
| UniverseSelection | UniverseSelection [get] |
| Get the universe selection instance More... | |
Events | |
| EventHandler< Subscription > | SubscriptionAdded |
| Event fired when a new subscription is added More... | |
| EventHandler< Subscription > | SubscriptionRemoved |
| Event fired when an existing subscription is removed More... | |
Events inherited from QuantConnect.Lean.Engine.DataFeeds.IDataFeedSubscriptionManager | |
| EventHandler< Subscription > | SubscriptionAdded |
| Event fired when a new subscription is added More... | |
| EventHandler< Subscription > | SubscriptionRemoved |
| Event fired when an existing subscription is removed More... | |
DataManager will manage the subscriptions for both the DataFeeds and the SubscriptionManager
Definition at line 35 of file DataManager.cs.
| QuantConnect.Lean.Engine.DataFeeds.DataManager.DataManager | ( | IDataFeed | dataFeed, |
| UniverseSelection | universeSelection, | ||
| IAlgorithm | algorithm, | ||
| ITimeKeeper | timeKeeper, | ||
| MarketHoursDatabase | marketHoursDatabase, | ||
| bool | liveMode, | ||
| IRegisteredSecurityDataTypesProvider | registeredTypesProvider, | ||
| IDataPermissionManager | dataPermissionManager | ||
| ) |
Creates a new instance of the DataManager
Definition at line 63 of file DataManager.cs.
| void QuantConnect.Lean.Engine.DataFeeds.DataManager.RemoveAllSubscriptions | ( | ) |
Will remove all current Subscription
Definition at line 250 of file DataManager.cs.
| bool QuantConnect.Lean.Engine.DataFeeds.DataManager.AddSubscription | ( | SubscriptionRequest | request | ) |
Adds a new Subscription to provide data for the specified security.
| request | Defines the SubscriptionRequest to be added |
Implements QuantConnect.Lean.Engine.DataFeeds.IDataFeedSubscriptionManager.
Definition at line 272 of file DataManager.cs.
| bool QuantConnect.Lean.Engine.DataFeeds.DataManager.RemoveSubscription | ( | SubscriptionDataConfig | configuration, |
| Universe | universe = null |
||
| ) |
Removes the Subscription, if it exists
| configuration | The SubscriptionDataConfig of the subscription to remove |
| universe | Universe requesting to remove Subscription. Default value, null, will remove all universes |
Implements QuantConnect.Lean.Engine.DataFeeds.IDataFeedSubscriptionManager.
Definition at line 335 of file DataManager.cs.
| SubscriptionDataConfig QuantConnect.Lean.Engine.DataFeeds.DataManager.SubscriptionManagerGetOrAdd | ( | SubscriptionDataConfig | newConfig | ) |
Gets existing or adds new SubscriptionDataConfig
Definition at line 453 of file DataManager.cs.
| int QuantConnect.Lean.Engine.DataFeeds.DataManager.SubscriptionManagerCount | ( | ) |
Returns the amount of data config subscriptions processed for the SubscriptionManager
Implements QuantConnect.Interfaces.IAlgorithmSubscriptionManager.
Definition at line 507 of file DataManager.cs.
| SubscriptionDataConfig QuantConnect.Lean.Engine.DataFeeds.DataManager.Add | ( | Type | dataType, |
| Symbol | symbol, | ||
| Resolution? | resolution = null, |
||
| bool | fillForward = true, |
||
| bool | extendedMarketHours = false, |
||
| bool | isFilteredSubscription = true, |
||
| bool | isInternalFeed = false, |
||
| bool | isCustomData = false, |
||
| DataNormalizationMode | dataNormalizationMode = DataNormalizationMode.Adjusted, |
||
| DataMappingMode | dataMappingMode = DataMappingMode.OpenInterest, |
||
| uint | contractDepthOffset = 0 |
||
| ) |
Creates and adds a list of SubscriptionDataConfig for a given symbol and configuration. Can optionally pass in desired subscription data type to use. If the config already existed will return existing instance instead
Implements QuantConnect.Interfaces.ISubscriptionDataConfigService.
Definition at line 527 of file DataManager.cs.
| List<SubscriptionDataConfig> QuantConnect.Lean.Engine.DataFeeds.DataManager.Add | ( | Symbol | symbol, |
| Resolution? | resolution = null, |
||
| bool | fillForward = true, |
||
| bool | extendedMarketHours = false, |
||
| bool | isFilteredSubscription = true, |
||
| bool | isInternalFeed = false, |
||
| bool | isCustomData = false, |
||
| List< Tuple< Type, TickType >> | subscriptionDataTypes = null, |
||
| DataNormalizationMode | dataNormalizationMode = DataNormalizationMode.Adjusted, |
||
| DataMappingMode | dataMappingMode = DataMappingMode.OpenInterest, |
||
| uint | contractDepthOffset = 0 |
||
| ) |
Creates and adds a list of SubscriptionDataConfig for a given symbol and configuration. Can optionally pass in desired subscription data types to use. If the config already existed will return existing instance instead
Implements QuantConnect.Interfaces.ISubscriptionDataConfigService.
Definition at line 552 of file DataManager.cs.
| List<Tuple<Type, TickType> > QuantConnect.Lean.Engine.DataFeeds.DataManager.LookupSubscriptionConfigDataTypes | ( | SecurityType | symbolSecurityType, |
| Resolution | resolution, | ||
| bool | isCanonical | ||
| ) |
Get the data feed types for a given SecurityType Resolution
| symbolSecurityType | The SecurityType used to determine the types |
| resolution | The resolution of the data requested |
| isCanonical | Indicates whether the security is Canonical (future and options) |
TODO: data type additions are very related to ticktype and should be more generic/independent of each other
Implements QuantConnect.Interfaces.ISubscriptionDataConfigService.
Definition at line 680 of file DataManager.cs.
| List<SubscriptionDataConfig> QuantConnect.Lean.Engine.DataFeeds.DataManager.GetSubscriptionDataConfigs | ( | Symbol | symbol = null, |
| bool | includeInternalConfigs = false |
||
| ) |
Gets a list of all registered SubscriptionDataConfig for a given Symbol
Will not return internal subscriptions by default
Implements QuantConnect.Interfaces.ISubscriptionDataConfigProvider.
Definition at line 714 of file DataManager.cs.
|
get |
Gets the data feed subscription collection
Definition at line 245 of file DataManager.cs.
|
get |
Gets all the current data config subscriptions that are being processed for the SubscriptionManager
Definition at line 435 of file DataManager.cs.
|
get |
The different TickType each SecurityType supports
Definition at line 520 of file DataManager.cs.
|
get |
Get the universe selection instance
Definition at line 734 of file DataManager.cs.
| EventHandler<Subscription> QuantConnect.Lean.Engine.DataFeeds.DataManager.SubscriptionAdded |
Event fired when a new subscription is added
Definition at line 53 of file DataManager.cs.
| EventHandler<Subscription> QuantConnect.Lean.Engine.DataFeeds.DataManager.SubscriptionRemoved |
Event fired when an existing subscription is removed
Definition at line 58 of file DataManager.cs.