Skip to content

BaseDataCollectionAggregatorEnumerator

QuantConnect.Lean.Engine.DataFeeds.Enumerators.BaseDataCollectionAggregatorEnumerator

BaseDataCollectionAggregatorEnumerator(
    enumerator: IEnumerator[BaseData],
    symbol: Union[Symbol, str, BaseContract],
    live_mode: bool = False,
)

Bases: Object, IEnumerator[BaseDataCollection]

Provides an implementation of IEnumerator{BaseDataCollection} that aggregates an underlying IEnumerator{BaseData} into a single data packet

Initializes a new instance of the BaseDataCollectionAggregatorEnumerator class This will aggregate instances emitted from the underlying enumerator and tag them with the specified symbol

Parameters:

Name Type Description Default
enumerator IEnumerator[BaseData]

The underlying enumerator to aggregate

required
symbol Union[Symbol, str, BaseContract]

The symbol to place on the aggregated collection

required
live_mode bool

True if running in live mode

False

current

Gets the element in the collection at the current position of the enumerator.

dispose

dispose() -> None

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

move_next

move_next() -> bool

Advances the enumerator to the next element of the collection.

Returns:

Type Description
bool

true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection.

reset

reset() -> None

Sets the enumerator to its initial position, which is before the first element in the collection.