SubscriptionData
QuantConnect.Lean.Engine.DataFeeds.SubscriptionData
SubscriptionData(
data: BaseData, emit_time_utc: Union[datetime, date]
)
Bases: Object
Store data (either raw or adjusted) and the time at which it should be synchronized
Initializes a new instance of the SubscriptionData class
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
BaseData
|
The base data |
required |
emit_time_utc
|
Union[datetime, date]
|
The emit time for the data |
required |
emit_time_utc
emit_time_utc: datetime
Gets the UTC emit time for this data
create
create(
daily_strict_end_time_enabled: bool,
configuration: SubscriptionDataConfig,
exchange_hours: SecurityExchangeHours,
offset_provider: TimeZoneOffsetProvider,
data: BaseData,
normalization_mode: DataNormalizationMode,
factor: Optional[float] = None,
) -> SubscriptionData
Clones the data, computes the utc emit time and performs exchange round down behavior, storing the result in a new SubscriptionData instance
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
configuration
|
SubscriptionDataConfig
|
The subscription's configuration |
required |
exchange_hours
|
SecurityExchangeHours
|
The exchange hours of the security |
required |
offset_provider
|
TimeZoneOffsetProvider
|
The subscription's offset provider |
required |
data
|
BaseData
|
The data being emitted |
required |
normalization_mode
|
DataNormalizationMode
|
Specifies how data is normalized |
required |
factor
|
Optional[float]
|
price scale factor |
None
|
Returns:
| Type | Description |
|---|---|
SubscriptionData
|
A new SubscriptionData containing the specified data. |