HistoryRequest
QuantConnect.Data.HistoryRequest
HistoryRequest(
start_time_utc: Union[datetime, date],
end_time_utc: Union[datetime, date],
data_type: Type,
symbol: Union[Symbol, str, BaseContract],
resolution: Resolution,
exchange_hours: SecurityExchangeHours,
data_time_zone: Any,
fill_forward_resolution: Optional[Resolution],
include_extended_market_hours: bool,
is_custom_data: bool,
data_normalization_mode: DataNormalizationMode,
tick_type: TickType,
data_mapping_mode: DataMappingMode = ...,
contract_depth_offset: int = 0,
)
HistoryRequest(
config: SubscriptionDataConfig,
hours: SecurityExchangeHours,
start_time_utc: Union[datetime, date],
end_time_utc: Union[datetime, date],
)
HistoryRequest(
request: HistoryRequest,
new_symbol: Union[Symbol, str, BaseContract],
new_start_time_utc: Union[datetime, date],
new_end_time_utc: Union[datetime, date],
)
Bases: BaseDataRequest
Represents a request for historical data
Signature descriptions:
-
Initializes a new instance of the HistoryRequest class from the specified parameters
-
Initializes a new instance of the HistoryRequest class from the specified config and exchange hours
-
Initializes a new instance of the HistoryRequest class with new Symbol, StartTimeUtc, EndTimeUtc
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start_time_utc
|
Optional[Union[datetime, date]]
|
The start time for this request, |
None
|
end_time_utc
|
Optional[Union[datetime, date]]
|
The end time for this request |
None
|
data_type
|
Optional[Type]
|
The data type of the output data |
None
|
symbol
|
Optional[Union[Symbol, str, BaseContract]]
|
The symbol to request data for |
None
|
resolution
|
Optional[Resolution]
|
The requested data resolution |
None
|
exchange_hours
|
Optional[SecurityExchangeHours]
|
The exchange hours used in fill forward processing |
None
|
data_time_zone
|
Optional[Any]
|
The time zone of the data |
None
|
fill_forward_resolution
|
Optional[Optional[Resolution]]
|
The requested fill forward resolution for this request |
None
|
include_extended_market_hours
|
Optional[bool]
|
True to include data from pre/post market hours |
None
|
is_custom_data
|
Optional[bool]
|
True for custom user data, false for normal QC data |
None
|
data_normalization_mode
|
Optional[DataNormalizationMode]
|
Specifies normalization mode used for this subscription |
None
|
tick_type
|
Optional[TickType]
|
The tick type used to created the SubscriptionDataConfig for the retrieval of history data |
None
|
data_mapping_mode
|
Optional[DataMappingMode]
|
The contract mapping mode to use for the security |
...
|
contract_depth_offset
|
Optional[int]
|
The continuous contract desired offset from the current front month. |
0
|
config
|
Optional[SubscriptionDataConfig]
|
The subscription data config used to initialize this request |
None
|
hours
|
Optional[SecurityExchangeHours]
|
The exchange hours used for fill forward processing |
None
|
request
|
Optional[HistoryRequest]
|
Represents a request for historical data |
None
|
new_start_time_utc
|
Optional[Union[datetime, date]]
|
The start time for this request |
None
|
new_end_time_utc
|
Optional[Union[datetime, date]]
|
The end time for this request |
None
|
fill_forward_resolution
fill_forward_resolution: Optional[Resolution]
Gets the requested fill forward resolution, set to null for no fill forward behavior. Will always return null when Resolution is set to Tick.
include_extended_market_hours
include_extended_market_hours: bool
Gets whether or not to include extended market hours data, set to false for only normal market hours
data_time_zone
data_time_zone: Any
Gets the time zone of the time stamps on the raw input data
data_normalization_mode
data_normalization_mode: DataNormalizationMode
Gets the normalization mode used for this subscription
data_mapping_mode
data_mapping_mode: DataMappingMode
Gets the data mapping mode used for this subscription
contract_depth_offset
contract_depth_offset: int
The continuous contract desired offset from the current front month. For example, 0 (default) will use the front month, 1 will use the back month contract
tradable_days_in_data_time_zone
tradable_days_in_data_time_zone: Iterable[datetime]
Gets the tradable days specified by this request, in the security's data time zone
start_time_utc
start_time_utc: datetime
Gets the beginning of the requested time interval in UTC
end_time_utc
end_time_utc: datetime
Gets the end of the requested time interval in UTC
start_time_local
start_time_local: datetime
Gets the start_time_utc in the security's exchange time zone
end_time_local
end_time_local: datetime
Gets the end_time_utc in the security's exchange time zone
exchange_hours
exchange_hours: SecurityExchangeHours
Gets the exchange hours used for processing fill forward requests
is_custom_data
is_custom_data: bool
Gets true if this is a custom data request, false for normal QC data
data_type
data_type: Type
The data type of this request