Lean
$LEAN_TAG$
|
Represents the data required for a data feed to process a single subscription More...
Public Member Functions | |
Subscription (SubscriptionRequest subscriptionRequest, IEnumerator< SubscriptionData > enumerator, TimeZoneOffsetProvider timeZoneOffsetProvider) | |
Initializes a new instance of the Subscription class with a universe More... | |
bool | AddSubscriptionRequest (SubscriptionRequest subscriptionRequest) |
Adds a SubscriptionRequest for this subscription More... | |
bool | RemoveSubscriptionRequest (Universe universe=null) |
Removes one or all SubscriptionRequest from this subscription More... | |
virtual bool | MoveNext () |
Advances the enumerator to the next element of the collection. More... | |
void | Reset () |
Sets the enumerator to its initial position, which is before the first element in the collection. More... | |
void | Dispose () |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. More... | |
void | MarkAsRemovedFromUniverse () |
Mark this subscription as having been removed from the universe. Data for this time step will be discarded. More... | |
override int | GetHashCode () |
Serves as a hash function for a particular type. More... | |
override bool | Equals (object obj) |
Determines whether the specified object is equal to the current object. More... | |
override string | ToString () |
Returns a string that represents the current object. More... | |
void | OnNewDataAvailable () |
Event invocator for the NewDataAvailable event More... | |
Public Attributes | |
IEnumerable< Universe > | Universes |
Gets the universe for this subscription More... | |
Properties | |
ISecurityPrice | Security [get] |
Gets the security this subscription points to More... | |
SubscriptionDataConfig | Configuration [get] |
Gets the configuration for this subscritions More... | |
DateTimeZone | TimeZone [get] |
Gets the exchange time zone associated with this subscription More... | |
TimeZoneOffsetProvider | OffsetProvider [get] |
Gets the offset provider for time zone conversions to and from the data's local time More... | |
decimal | RealtimePrice [get, set] |
Gets the most current value from the subscription source More... | |
bool | EndOfStream [get] |
Gets true if this subscription is finished, false otherwise More... | |
bool | IsUniverseSelectionSubscription [get] |
Gets true if this subscription is used in universe selection More... | |
DateTime | UtcStartTime [get] |
Gets the start time of this subscription in UTC More... | |
DateTime | UtcEndTime [get] |
Gets the end time of this subscription in UTC More... | |
IReadOnlyRef< bool > | RemovedFromUniverse [get] |
Gets whether or not this subscription has been removed from its parent universe More... | |
SubscriptionData | Current [get] |
Gets the element in the collection at the current position of the enumerator. More... | |
Events | |
EventHandler | NewDataAvailable |
Event fired when a new data point is available More... | |
Represents the data required for a data feed to process a single subscription
Definition at line 32 of file Subscription.cs.
QuantConnect.Lean.Engine.DataFeeds.Subscription.Subscription | ( | SubscriptionRequest | subscriptionRequest, |
IEnumerator< SubscriptionData > | enumerator, | ||
TimeZoneOffsetProvider | timeZoneOffsetProvider | ||
) |
Initializes a new instance of the Subscription class with a universe
subscriptionRequest | Specified for universe subscriptions |
enumerator | The subscription's data source |
timeZoneOffsetProvider | The offset provider used to convert data local times to utc |
Definition at line 110 of file Subscription.cs.
bool QuantConnect.Lean.Engine.DataFeeds.Subscription.AddSubscriptionRequest | ( | SubscriptionRequest | subscriptionRequest | ) |
Adds a SubscriptionRequest for this subscription
subscriptionRequest | The SubscriptionRequest to add |
Definition at line 132 of file Subscription.cs.
bool QuantConnect.Lean.Engine.DataFeeds.Subscription.RemoveSubscriptionRequest | ( | Universe | universe = null | ) |
Removes one or all SubscriptionRequest from this subscription
universe | Universe requesting to remove SubscriptionRequest. Default value, null, will remove all universes |
Definition at line 164 of file Subscription.cs.
|
virtual |
Advances the enumerator to the next element of the collection.
T:System.InvalidOperationException | The collection was modified after the enumerator was created. |
<filterpriority>2</filterpriority>
Definition at line 203 of file Subscription.cs.
void QuantConnect.Lean.Engine.DataFeeds.Subscription.Reset | ( | ) |
Sets the enumerator to its initial position, which is before the first element in the collection.
T:System.InvalidOperationException | The collection was modified after the enumerator was created. |
<filterpriority>2</filterpriority>
Definition at line 220 of file Subscription.cs.
void QuantConnect.Lean.Engine.DataFeeds.Subscription.Dispose | ( | ) |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
<filterpriority>2</filterpriority>
Definition at line 246 of file Subscription.cs.
void QuantConnect.Lean.Engine.DataFeeds.Subscription.MarkAsRemovedFromUniverse | ( | ) |
Mark this subscription as having been removed from the universe. Data for this time step will be discarded.
Definition at line 256 of file Subscription.cs.
override int QuantConnect.Lean.Engine.DataFeeds.Subscription.GetHashCode | ( | ) |
Serves as a hash function for a particular type.
<filterpriority>2</filterpriority>
Definition at line 268 of file Subscription.cs.
override bool QuantConnect.Lean.Engine.DataFeeds.Subscription.Equals | ( | object | obj | ) |
Determines whether the specified object is equal to the current object.
obj | The object to compare with the current object. |
true
if the specified object is equal to the current object; otherwise, false
.Definition at line 277 of file Subscription.cs.
override string QuantConnect.Lean.Engine.DataFeeds.Subscription.ToString | ( | ) |
Returns a string that represents the current object.
<filterpriority>2</filterpriority>
Definition at line 291 of file Subscription.cs.
void QuantConnect.Lean.Engine.DataFeeds.Subscription.OnNewDataAvailable | ( | ) |
Event invocator for the NewDataAvailable event
Definition at line 299 of file Subscription.cs.
IEnumerable<Universe> QuantConnect.Lean.Engine.DataFeeds.Subscription.Universes |
Gets the universe for this subscription
Definition at line 50 of file Subscription.cs.
|
get |
Gets the security this subscription points to
Definition at line 57 of file Subscription.cs.
|
get |
Gets the configuration for this subscritions
Definition at line 62 of file Subscription.cs.
|
get |
Gets the exchange time zone associated with this subscription
Definition at line 67 of file Subscription.cs.
|
get |
Gets the offset provider for time zone conversions to and from the data's local time
Definition at line 72 of file Subscription.cs.
|
getset |
Gets the most current value from the subscription source
Definition at line 77 of file Subscription.cs.
|
get |
Gets true if this subscription is finished, false otherwise
Definition at line 82 of file Subscription.cs.
|
get |
Gets true if this subscription is used in universe selection
Definition at line 87 of file Subscription.cs.
|
get |
Gets the start time of this subscription in UTC
Definition at line 92 of file Subscription.cs.
|
get |
Gets the end time of this subscription in UTC
Definition at line 97 of file Subscription.cs.
|
get |
Gets whether or not this subscription has been removed from its parent universe
Definition at line 102 of file Subscription.cs.
|
get |
Gets the element in the collection at the current position of the enumerator.
Definition at line 231 of file Subscription.cs.
EventHandler QuantConnect.Lean.Engine.DataFeeds.Subscription.NewDataAvailable |
Event fired when a new data point is available
Definition at line 45 of file Subscription.cs.