Lean
$LEAN_TAG$
|
Enumerable Subscription Management Class More...
Public Member Functions | |
SubscriptionManager (ITimeKeeper timeKeeper) | |
Creates a new instance More... | |
SubscriptionDataConfig | Add (Symbol symbol, Resolution resolution, DateTimeZone timeZone, DateTimeZone exchangeTimeZone, bool isCustomData=false, bool fillForward=true, bool extendedMarketHours=false) |
Add Market Data Required (Overloaded method for backwards compatibility). More... | |
SubscriptionDataConfig | Add (Type dataType, TickType tickType, Symbol symbol, Resolution resolution, DateTimeZone dataTimeZone, DateTimeZone exchangeTimeZone, bool isCustomData, bool fillForward=true, bool extendedMarketHours=false, bool isInternalFeed=false, bool isFilteredSubscription=true, DataNormalizationMode dataNormalizationMode=DataNormalizationMode.Adjusted) |
Add Market Data Required - generic data typing support as long as Type implements BaseData. More... | |
void | AddConsolidator (Symbol symbol, IDataConsolidator consolidator, TickType? tickType=null) |
Add a consolidator for the symbol More... | |
void | AddConsolidator (Symbol symbol, PyObject pyConsolidator) |
Add a custom python consolidator for the symbol More... | |
void | RemoveConsolidator (Symbol symbol, IDataConsolidator consolidator) |
Removes the specified consolidator for the symbol More... | |
void | RemoveConsolidator (Symbol symbol, PyObject pyConsolidator) |
Removes the specified python consolidator for the symbol More... | |
void | ScanPastConsolidators (DateTime newUtcTime, IAlgorithm algorithm) |
Will trigger past consolidator scans More... | |
IReadOnlyList< TickType > | GetDataTypesForSecurity (SecurityType securityType) |
Get the available data types for a security More... | |
List< Tuple< Type, TickType > > | LookupSubscriptionConfigDataTypes (SecurityType symbolSecurityType, Resolution resolution, bool isCanonical) |
Get the data feed types for a given SecurityType Resolution More... | |
void | SetDataManager (IAlgorithmSubscriptionManager subscriptionManager) |
Sets the Subscription Manager More... | |
Static Public Member Functions | |
static Dictionary< SecurityType, List< TickType > > | DefaultDataTypes () |
Hard code the set of default available data feeds More... | |
static bool | IsSubscriptionValidForConsolidator (SubscriptionDataConfig subscription, IDataConsolidator consolidator, TickType? desiredTickType=null) |
Checks if the subscription is valid for the consolidator More... | |
Public Attributes | |
ISubscriptionDataConfigService | SubscriptionDataConfigService => _subscriptionManager |
Instance that implements ISubscriptionDataConfigService More... | |
IEnumerable< SubscriptionDataConfig > | Subscriptions => _subscriptionManager.SubscriptionManagerSubscriptions.Where(config => !config.IsInternalFeed) |
Returns an IEnumerable of Subscriptions More... | |
Dictionary< SecurityType, List< TickType > > | AvailableDataTypes => _subscriptionManager.AvailableDataTypes |
The different TickType each SecurityType supports More... | |
int | Count => _subscriptionManager.SubscriptionManagerCount() |
Get the count of assets: More... | |
Enumerable Subscription Management Class
Definition at line 32 of file SubscriptionManager.cs.
QuantConnect.Data.SubscriptionManager.SubscriptionManager | ( | ITimeKeeper | timeKeeper | ) |
Creates a new instance
Definition at line 65 of file SubscriptionManager.cs.
SubscriptionDataConfig QuantConnect.Data.SubscriptionManager.Add | ( | Symbol | symbol, |
Resolution | resolution, | ||
DateTimeZone | timeZone, | ||
DateTimeZone | exchangeTimeZone, | ||
bool | isCustomData = false , |
||
bool | fillForward = true , |
||
bool | extendedMarketHours = false |
||
) |
Add Market Data Required (Overloaded method for backwards compatibility).
symbol | Symbol of the asset we're like |
resolution | Resolution of Asset Required |
timeZone | The time zone the subscription's data is time stamped in |
exchangeTimeZone | Specifies the time zone of the exchange for the security this subscription is for. This is this output time zone, that is, the time zone that will be used on BaseData instances |
isCustomData | True if this is custom user supplied data, false for normal QC data |
fillForward | when there is no data pass the last tradebar forward |
extendedMarketHours | Request premarket data as well when true |
Definition at line 89 of file SubscriptionManager.cs.
SubscriptionDataConfig QuantConnect.Data.SubscriptionManager.Add | ( | Type | dataType, |
TickType | tickType, | ||
Symbol | symbol, | ||
Resolution | resolution, | ||
DateTimeZone | dataTimeZone, | ||
DateTimeZone | exchangeTimeZone, | ||
bool | isCustomData, | ||
bool | fillForward = true , |
||
bool | extendedMarketHours = false , |
||
bool | isInternalFeed = false , |
||
bool | isFilteredSubscription = true , |
||
DataNormalizationMode | dataNormalizationMode = DataNormalizationMode.Adjusted |
||
) |
Add Market Data Required - generic data typing support as long as Type implements BaseData.
dataType | Set the type of the data we're subscribing to. |
tickType | Tick type for the subscription. |
symbol | Symbol of the asset we're like |
resolution | Resolution of Asset Required |
dataTimeZone | The time zone the subscription's data is time stamped in |
exchangeTimeZone | Specifies the time zone of the exchange for the security this subscription is for. This is this output time zone, that is, the time zone that will be used on BaseData instances |
isCustomData | True if this is custom user supplied data, false for normal QC data |
fillForward | when there is no data pass the last tradebar forward |
extendedMarketHours | Request premarket data as well when true |
isInternalFeed | Set to true to prevent data from this subscription from being sent into the algorithm's OnData events |
isFilteredSubscription | True if this subscription should have filters applied to it (market hours/user filters from security), false otherwise |
dataNormalizationMode | Define how data is normalized |
Definition at line 138 of file SubscriptionManager.cs.
void QuantConnect.Data.SubscriptionManager.AddConsolidator | ( | Symbol | symbol, |
IDataConsolidator | consolidator, | ||
TickType? | tickType = null |
||
) |
Add a consolidator for the symbol
symbol | Symbol of the asset to consolidate |
consolidator | The consolidator |
tickType | Desired tick type for the subscription |
Definition at line 165 of file SubscriptionManager.cs.
void QuantConnect.Data.SubscriptionManager.AddConsolidator | ( | Symbol | symbol, |
PyObject | pyConsolidator | ||
) |
Add a custom python consolidator for the symbol
symbol | Symbol of the asset to consolidate |
pyConsolidator | The custom python consolidator |
Definition at line 212 of file SubscriptionManager.cs.
void QuantConnect.Data.SubscriptionManager.RemoveConsolidator | ( | Symbol | symbol, |
IDataConsolidator | consolidator | ||
) |
Removes the specified consolidator for the symbol
symbol | The symbol the consolidator is receiving data from |
consolidator | The consolidator instance to be removed |
Definition at line 227 of file SubscriptionManager.cs.
void QuantConnect.Data.SubscriptionManager.RemoveConsolidator | ( | Symbol | symbol, |
PyObject | pyConsolidator | ||
) |
Removes the specified python consolidator for the symbol
symbol | The symbol the consolidator is receiving data from |
pyConsolidator | The python consolidator instance to be removed |
Definition at line 253 of file SubscriptionManager.cs.
void QuantConnect.Data.SubscriptionManager.ScanPastConsolidators | ( | DateTime | newUtcTime, |
IAlgorithm | algorithm | ||
) |
Will trigger past consolidator scans
newUtcTime | The new utc time |
algorithm | The algorithm instance |
Definition at line 268 of file SubscriptionManager.cs.
|
static |
Hard code the set of default available data feeds
Definition at line 307 of file SubscriptionManager.cs.
IReadOnlyList<TickType> QuantConnect.Data.SubscriptionManager.GetDataTypesForSecurity | ( | SecurityType | securityType | ) |
Get the available data types for a security
Definition at line 329 of file SubscriptionManager.cs.
List<Tuple<Type, TickType> > QuantConnect.Data.SubscriptionManager.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) |
Definition at line 341 of file SubscriptionManager.cs.
void QuantConnect.Data.SubscriptionManager.SetDataManager | ( | IAlgorithmSubscriptionManager | subscriptionManager | ) |
Sets the Subscription Manager
Definition at line 353 of file SubscriptionManager.cs.
|
static |
Checks if the subscription is valid for the consolidator
subscription | The subscription configuration |
consolidator | The consolidator |
desiredTickType | The desired tick type for the subscription. If not given is null. |
Definition at line 365 of file SubscriptionManager.cs.
ISubscriptionDataConfigService QuantConnect.Data.SubscriptionManager.SubscriptionDataConfigService => _subscriptionManager |
Instance that implements ISubscriptionDataConfigService
Definition at line 44 of file SubscriptionManager.cs.
IEnumerable<SubscriptionDataConfig> QuantConnect.Data.SubscriptionManager.Subscriptions => _subscriptionManager.SubscriptionManagerSubscriptions.Where(config => !config.IsInternalFeed) |
Returns an IEnumerable of Subscriptions
Will not return internal subscriptions
Definition at line 50 of file SubscriptionManager.cs.
Dictionary<SecurityType, List<TickType> > QuantConnect.Data.SubscriptionManager.AvailableDataTypes => _subscriptionManager.AvailableDataTypes |
The different TickType each SecurityType supports
Definition at line 55 of file SubscriptionManager.cs.
int QuantConnect.Data.SubscriptionManager.Count => _subscriptionManager.SubscriptionManagerCount() |
Get the count of assets:
Definition at line 60 of file SubscriptionManager.cs.