Skip to content

CompositeTimeProvider

QuantConnect.Lean.Engine.DataFeeds.CompositeTimeProvider

CompositeTimeProvider(time_providers: List[ITimeProvider])

Bases: Object, ITimeProvider

The composite time provider will source it's current time using the smallest time from the given providers

Creates a new instance

Parameters:

Name Type Description Default
time_providers List[ITimeProvider]

The time providers to use. Will default to the real time provider if empty

required

get_utc_now

get_utc_now() -> datetime

Gets the current time in UTC

Returns:

Type Description
datetime

The current time in UTC.