Skip to content

IDataAggregator

QuantConnect.Data.IDataAggregator

Bases: IDisposable

Aggregates ticks and bars based on given subscriptions.

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.

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

Remove the given subscription

Parameters:

Name Type Description Default
data_config SubscriptionDataConfig

defines the subscription configuration data.

required

Returns:

Type Description
bool

Returns true if given SubscriptionDataConfig was found and succesfully removed; otherwise false.

update

update(input: BaseData) -> None

Adds new BaseData input into aggregator.

Parameters:

Name Type Description Default
input BaseData

The new data

required