Skip to content

SubscriptionDataEnumerator

QuantConnect.Lean.Engine.DataFeeds.Enumerators.SubscriptionDataEnumerator

SubscriptionDataEnumerator(
    configuration: SubscriptionDataConfig,
    exchange_hours: SecurityExchangeHours,
    offset_provider: TimeZoneOffsetProvider,
    enumerator: IEnumerator[BaseData],
    is_universe: bool,
    daily_strict_end_time_enabled: bool,
)

Bases: Object, IEnumerator[SubscriptionData]

An IEnumerator{SubscriptionData} which wraps an existing IEnumerator{BaseData}.

Creates a new instance

Parameters:

Name Type Description Default
configuration SubscriptionDataConfig

The subscription's configuration

required
exchange_hours SecurityExchangeHours

The security's exchange hours

required
offset_provider TimeZoneOffsetProvider

The subscription's time zone offset provider

required
enumerator IEnumerator[BaseData]

The underlying data enumerator

required
is_universe bool

The subscription is a universe subscription

required

Returns:

Type Description
None

A subscription data enumerator.

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.