SynchronizingHistoryProvider
QuantConnect.Lean.Engine.HistoricalData.SynchronizingHistoryProvider
Bases: HistoryProviderBase
Provides an abstract implementation of IHistoryProvider which provides synchronization of multiple history results
MARKET_HOURS
MARKET_HOURS: MarketHoursDatabase = ...
The market hours database
This codeEntityType is protected.
data_point_count
data_point_count: int
Gets the total number of data points emitted by this history provider
invalid_configuration_detected
invalid_configuration_detected: _EventContainer[
Callable[
[Object, InvalidConfigurationDetectedEventArgs], Any
],
Any,
]
Event fired when an invalid configuration has been detected
numerical_precision_limited
numerical_precision_limited: _EventContainer[
Callable[
[Object, NumericalPrecisionLimitedEventArgs], Any
],
Any,
]
Event fired when the numerical precision in the factor file has been limited
download_failed
download_failed: _EventContainer[
Callable[[Object, DownloadFailedEventArgs], Any], Any
]
Event fired when there was an error downloading a remote file
reader_error_detected
reader_error_detected: _EventContainer[
Callable[[Object, ReaderErrorDetectedEventArgs], Any],
Any,
]
Event fired when there was an error reading the data
start_date_limited
start_date_limited: _EventContainer[
Callable[[Object, StartDateLimitedEventArgs], Any], Any
]
Event fired when the start date has been limited
create_slice_enumerable_from_subscriptions
create_slice_enumerable_from_subscriptions(
subscriptions: List[Subscription], slice_time_zone: Any
) -> Iterable[Slice]
Enumerates the subscriptions into slices
This codeEntityType is protected.
create_subscription
create_subscription(
request: HistoryRequest, history: List[BaseData]
) -> Subscription
Creates a subscription to process the history request
This codeEntityType is protected.
get_security_exchange
get_security_exchange(
exchange: SecurityExchange,
data_type: Type,
symbol: Union[Symbol, str, BaseContract],
) -> SecurityExchange
Retrieves the appropriate SecurityExchange based on the data type and symbol.
This codeEntityType is protected.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
exchange
|
SecurityExchange
|
The default exchange instance. |
required |
data_type
|
Type
|
The type of data being processed. |
required |
symbol
|
Union[Symbol, str, BaseContract]
|
The security symbol. |
required |
Returns:
| Type | Description |
|---|---|
SecurityExchange
|
The security exchange with appropriate market hours. |
get_history
get_history(
requests: List[HistoryRequest], slice_time_zone: Any
) -> Iterable[Slice]
Gets the history for the requested securities
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
requests
|
List[HistoryRequest]
|
The historical data requests |
required |
slice_time_zone
|
Any
|
The time zone used when time stamping the slice instances |
required |
Returns:
| Type | Description |
|---|---|
Iterable[Slice]
|
An enumerable of the slices of data covering the span specified in each request. |
initialize
initialize(
parameters: HistoryProviderInitializeParameters,
) -> None
Initializes this history provider to work for the specified job
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parameters
|
HistoryProviderInitializeParameters
|
The initialization parameters |
required |
on_download_failed
on_download_failed(e: DownloadFailedEventArgs) -> None
Event invocator for the download_failed event
This codeEntityType is protected.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
e
|
DownloadFailedEventArgs
|
Event arguments for the download_failed event |
required |
on_invalid_configuration_detected
on_invalid_configuration_detected(
e: InvalidConfigurationDetectedEventArgs,
) -> None
Event invocator for the invalid_configuration_detected event
This codeEntityType is protected.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
e
|
InvalidConfigurationDetectedEventArgs
|
Event arguments for the invalid_configuration_detected event |
required |
on_numerical_precision_limited
on_numerical_precision_limited(
e: NumericalPrecisionLimitedEventArgs,
) -> None
Event invocator for the numerical_precision_limited event
This codeEntityType is protected.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
e
|
NumericalPrecisionLimitedEventArgs
|
Event arguments for the numerical_precision_limited event |
required |
on_reader_error_detected
on_reader_error_detected(
e: ReaderErrorDetectedEventArgs,
) -> None
Event invocator for the reader_error_detected event
This codeEntityType is protected.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
e
|
ReaderErrorDetectedEventArgs
|
Event arguments for the reader_error_detected event |
required |
on_start_date_limited
on_start_date_limited(e: StartDateLimitedEventArgs) -> None
Event invocator for the start_date_limited event
This codeEntityType is protected.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
e
|
StartDateLimitedEventArgs
|
Event arguments for the start_date_limited event |
required |