AggregationManager
QuantConnect.Lean.Engine.DataFeeds.AggregationManager
Bases: Object, IDataAggregator
Aggregates ticks and bars based on given subscriptions. Current implementation is based on IDataConsolidator that consolidates ticks and put them into enumerator.
time_provider
time_provider: ITimeProvider
Continuous UTC time provider
This codeEntityType is protected.
add
add(
data_config: SubscriptionDataConfig,
new_data_available_handler: Callable[
[Object, EventArgs], Any
],
) -> IEnumerator[BaseData]
Add new subscription to current IDataAggregator instance
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_config
|
SubscriptionDataConfig
|
defines the parameters to subscribe to a data feed |
required |
new_data_available_handler
|
Callable[[Object, EventArgs], Any]
|
handler to be fired on new data available |
required |
Returns:
| Type | Description |
|---|---|
IEnumerator[BaseData]
|
The new enumerator for this subscription request. |
dispose
dispose() -> None
Dispose of the aggregation manager.
get_consolidator
get_consolidator(
config: SubscriptionDataConfig,
) -> IDataConsolidator
Gets the consolidator to aggregate data for the given config
This codeEntityType is protected.
initialize
initialize(
parameters: DataAggregatorInitializeParameters,
) -> None
Initialize this instance
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parameters
|
DataAggregatorInitializeParameters
|
The parameters dto instance |
required |
remove
remove(data_config: SubscriptionDataConfig) -> bool
Removes the handler with the specified identifier
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_config
|
SubscriptionDataConfig
|
Subscription data configuration to be removed |
required |