Lean  $LEAN_TAG$
QuantConnect.Data.HistoryRequest Class Reference

Represents a request for historical data More...

Inheritance diagram for QuantConnect.Data.HistoryRequest:
[legend]

Public Member Functions

 HistoryRequest (DateTime startTimeUtc, DateTime endTimeUtc, Type dataType, Symbol symbol, Resolution resolution, SecurityExchangeHours exchangeHours, DateTimeZone dataTimeZone, Resolution? fillForwardResolution, bool includeExtendedMarketHours, bool isCustomData, DataNormalizationMode dataNormalizationMode, TickType tickType, DataMappingMode dataMappingMode=DataMappingMode.OpenInterest, uint contractDepthOffset=0)
 Initializes a new instance of the HistoryRequest class from the specified parameters More...
 
 HistoryRequest (SubscriptionDataConfig config, SecurityExchangeHours hours, DateTime startTimeUtc, DateTime endTimeUtc)
 Initializes a new instance of the HistoryRequest class from the specified config and exchange hours More...
 
 HistoryRequest (HistoryRequest request, Symbol newSymbol, DateTime newStartTimeUtc, DateTime newEndTimeUtc)
 Initializes a new instance of the HistoryRequest class with new Symbol, StartTimeUtc, EndTimeUtc More...
 

Public Attributes

override IEnumerable< DateTime > TradableDaysInDataTimeZone
 Gets the tradable days specified by this request, in the security's data time zone More...
 
- Public Attributes inherited from QuantConnect.Data.BaseDataRequest
DateTime StartTimeLocal => _localStartTime.Value
 Gets the StartTimeUtc in the security's exchange time zone More...
 
DateTime EndTimeLocal => _localEndTime.Value
 Gets the EndTimeUtc in the security's exchange time zone More...
 

Properties

Symbol Symbol [get, set]
 Gets the symbol to request data for More...
 
Resolution Resolution [get, set]
 Gets the requested data resolution More...
 
Resolution?? FillForwardResolution [get, set]
 Gets the requested fill forward resolution, set to null for no fill forward behavior. Will always return null when Resolution is set to Tick. More...
 
bool IncludeExtendedMarketHours [get, set]
 Gets whether or not to include extended market hours data, set to false for only normal market hours More...
 
Type DataType [get, set]
 Gets the data type used to process the subscription request, this type must derive from BaseData More...
 
DateTimeZone DataTimeZone [get, set]
 Gets the time zone of the time stamps on the raw input data More...
 
TickType TickType [get, set]
 TickType of the history request More...
 
bool IsCustomData [get, set]
 Gets true if this is a custom data request, false for normal QC data More...
 
DataNormalizationMode DataNormalizationMode [get, set]
 Gets the normalization mode used for this subscription More...
 
DataMappingMode DataMappingMode [get, set]
 Gets the data mapping mode used for this subscription More...
 
uint ContractDepthOffset [get, set]
 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 More...
 
- Properties inherited from QuantConnect.Data.BaseDataRequest
DateTime StartTimeUtc [get, protected set]
 Gets the beginning of the requested time interval in UTC More...
 
DateTime EndTimeUtc [get, protected set]
 Gets the end of the requested time interval in UTC More...
 
SecurityExchangeHours ExchangeHours [get]
 Gets the exchange hours used for processing fill forward requests More...
 
abstract IEnumerable< DateTime > TradableDaysInDataTimeZone [get]
 Gets the tradable days specified by this request, in the security's data time zone More...
 

Additional Inherited Members

- Protected Member Functions inherited from QuantConnect.Data.BaseDataRequest
 BaseDataRequest (DateTime startTimeUtc, DateTime endTimeUtc, SecurityExchangeHours exchangeHours, TickType tickType)
 Initializes the base data request More...
 

Detailed Description

Represents a request for historical data

Definition at line 27 of file HistoryRequest.cs.

Constructor & Destructor Documentation

◆ HistoryRequest() [1/3]

QuantConnect.Data.HistoryRequest.HistoryRequest ( DateTime  startTimeUtc,
DateTime  endTimeUtc,
Type  dataType,
Symbol  symbol,
Resolution  resolution,
SecurityExchangeHours  exchangeHours,
DateTimeZone  dataTimeZone,
Resolution fillForwardResolution,
bool  includeExtendedMarketHours,
bool  isCustomData,
DataNormalizationMode  dataNormalizationMode,
TickType  tickType,
DataMappingMode  dataMappingMode = DataMappingMode.OpenInterest,
uint  contractDepthOffset = 0 
)

Initializes a new instance of the HistoryRequest class from the specified parameters

Parameters
startTimeUtcThe start time for this request,
endTimeUtcThe end time for this request
dataTypeThe data type of the output data
symbolThe symbol to request data for
resolutionThe requested data resolution
exchangeHoursThe exchange hours used in fill forward processing
dataTimeZoneThe time zone of the data
fillForwardResolutionThe requested fill forward resolution for this request
includeExtendedMarketHoursTrue to include data from pre/post market hours
isCustomDataTrue for custom user data, false for normal QC data
dataNormalizationModeSpecifies normalization mode used for this subscription
tickTypeThe tick type used to created the SubscriptionDataConfig for the retrieval of history data
dataMappingModeThe contract mapping mode to use for the security
contractDepthOffsetThe continuous contract desired offset from the current front month. For example, 0 will use the front month, 1 will use the back month contract

Definition at line 125 of file HistoryRequest.cs.

◆ HistoryRequest() [2/3]

QuantConnect.Data.HistoryRequest.HistoryRequest ( SubscriptionDataConfig  config,
SecurityExchangeHours  hours,
DateTime  startTimeUtc,
DateTime  endTimeUtc 
)

Initializes a new instance of the HistoryRequest class from the specified config and exchange hours

Parameters
configThe subscription data config used to initialize this request
hoursThe exchange hours used for fill forward processing
startTimeUtcThe start time for this request,
endTimeUtcThe end time for this request

Definition at line 161 of file HistoryRequest.cs.

◆ HistoryRequest() [3/3]

QuantConnect.Data.HistoryRequest.HistoryRequest ( HistoryRequest  request,
Symbol  newSymbol,
DateTime  newStartTimeUtc,
DateTime  newEndTimeUtc 
)

Initializes a new instance of the HistoryRequest class with new Symbol, StartTimeUtc, EndTimeUtc

Parameters
requestRepresents a request for historical data
newStartTimeUtcThe start time for this request
newEndTimeUtcThe end time for this request

Definition at line 174 of file HistoryRequest.cs.

Member Data Documentation

◆ TradableDaysInDataTimeZone

override IEnumerable<DateTime> QuantConnect.Data.HistoryRequest.TradableDaysInDataTimeZone
Initial value:

Gets the tradable days specified by this request, in the security's data time zone

Definition at line 101 of file HistoryRequest.cs.

Property Documentation

◆ Symbol

Symbol QuantConnect.Data.HistoryRequest.Symbol
getset

Gets the symbol to request data for

Definition at line 34 of file HistoryRequest.cs.

◆ Resolution

Resolution QuantConnect.Data.HistoryRequest.Resolution
getset

Gets the requested data resolution

Definition at line 39 of file HistoryRequest.cs.

◆ FillForwardResolution

Resolution?? QuantConnect.Data.HistoryRequest.FillForwardResolution
getset

Gets the requested fill forward resolution, set to null for no fill forward behavior. Will always return null when Resolution is set to Tick.

Definition at line 46 of file HistoryRequest.cs.

◆ IncludeExtendedMarketHours

bool QuantConnect.Data.HistoryRequest.IncludeExtendedMarketHours
getset

Gets whether or not to include extended market hours data, set to false for only normal market hours

Definition at line 60 of file HistoryRequest.cs.

◆ DataType

Type QuantConnect.Data.HistoryRequest.DataType
getset

Gets the data type used to process the subscription request, this type must derive from BaseData

Definition at line 65 of file HistoryRequest.cs.

◆ DataTimeZone

DateTimeZone QuantConnect.Data.HistoryRequest.DataTimeZone
getset

Gets the time zone of the time stamps on the raw input data

Definition at line 70 of file HistoryRequest.cs.

◆ TickType

TickType QuantConnect.Data.HistoryRequest.TickType
getset

TickType of the history request

Definition at line 75 of file HistoryRequest.cs.

◆ IsCustomData

bool QuantConnect.Data.HistoryRequest.IsCustomData
getset

Gets true if this is a custom data request, false for normal QC data

Definition at line 80 of file HistoryRequest.cs.

◆ DataNormalizationMode

DataNormalizationMode QuantConnect.Data.HistoryRequest.DataNormalizationMode
getset

Gets the normalization mode used for this subscription

Definition at line 85 of file HistoryRequest.cs.

◆ DataMappingMode

DataMappingMode QuantConnect.Data.HistoryRequest.DataMappingMode
getset

Gets the data mapping mode used for this subscription

Definition at line 90 of file HistoryRequest.cs.

◆ ContractDepthOffset

uint QuantConnect.Data.HistoryRequest.ContractDepthOffset
getset

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

Definition at line 96 of file HistoryRequest.cs.


The documentation for this class was generated from the following file: