Lean
$LEAN_TAG$
|
Data provider which downloads data using an IDataDownloader or IBrokerage implementation More...
Public Member Functions | |
DownloaderDataProvider () | |
Creates a new instance More... | |
DownloaderDataProvider (IDataDownloader dataDownloader) | |
Creates a new instance using a target data downloader used for testing More... | |
override Stream | Fetch (string key) |
Determines if it should downloads new data and retrieves data from disc More... | |
IEnumerable< IGrouping< Symbol, BaseData > > | GetDownloadedData (IEnumerable< DataDownloaderGetParameters > downloaderDataParameters, Symbol symbol, DateTimeZone exchangeTimeZone, DateTimeZone dataTimeZone, Type dataType) |
Retrieves downloaded data grouped by symbol based on IDownloadProvider. More... | |
Public Member Functions inherited from QuantConnect.Lean.Engine.DataFeeds.DefaultDataProvider | |
void | Dispose () |
The stream created by this type is passed up the stack to the IStreamReader The stream is closed when the StreamReader that wraps this stream is disposed More... | |
Static Public Member Functions | |
static IEnumerable< IGrouping< Symbol, BaseData > > | FilterAndGroupDownloadDataBySymbol (IEnumerable< BaseData > downloadData, Symbol symbol, Type dataType, DateTimeZone exchangeTimeZone, DateTimeZone dataTimeZone, DateTime downloaderStartTimeUtc, DateTime downloaderEndTimeUtc) |
Filters and groups the provided download data by symbol, based on specified criteria. More... | |
Protected Member Functions | |
override Stream | GetStream (string key) |
Get's the stream for a given file path More... | |
override bool | NeedToDownload (string filePath) |
Main filter to determine if this file needs to be downloaded More... | |
Protected Member Functions inherited from QuantConnect.Lean.Engine.DataFeeds.BaseDownloaderDataProvider | |
Stream | DownloadOnce (string key, Action< string > download) |
Helper method which guarantees each requested key is downloaded only once concurrently if required based on NeedToDownload More... | |
Protected Member Functions inherited from QuantConnect.Lean.Engine.DataFeeds.DefaultDataProvider | |
virtual void | OnNewDataRequest (DataProviderNewDataRequestEventArgs e) |
Event invocator for the NewDataRequest event More... | |
Additional Inherited Members | |
Events inherited from QuantConnect.Lean.Engine.DataFeeds.DefaultDataProvider | |
EventHandler< DataProviderNewDataRequestEventArgs > | NewDataRequest |
Event raised each time data fetch is finished (successfully or not) More... | |
Events inherited from QuantConnect.Interfaces.IDataProvider | |
EventHandler< DataProviderNewDataRequestEventArgs > | NewDataRequest |
Event raised each time data fetch is finished (successfully or not) More... | |
Data provider which downloads data using an IDataDownloader or IBrokerage implementation
Definition at line 35 of file DownloaderDataProvider.cs.
QuantConnect.Lean.Engine.DataFeeds.DownloaderDataProvider.DownloaderDataProvider | ( | ) |
Creates a new instance
Definition at line 52 of file DownloaderDataProvider.cs.
QuantConnect.Lean.Engine.DataFeeds.DownloaderDataProvider.DownloaderDataProvider | ( | IDataDownloader | dataDownloader | ) |
Creates a new instance using a target data downloader used for testing
Definition at line 68 of file DownloaderDataProvider.cs.
|
virtual |
Determines if it should downloads new data and retrieves data from disc
key | A string representing where the data is stored |
Reimplemented from QuantConnect.Lean.Engine.DataFeeds.DefaultDataProvider.
Definition at line 78 of file DownloaderDataProvider.cs.
IEnumerable<IGrouping<Symbol, BaseData> > QuantConnect.Lean.Engine.DataFeeds.DownloaderDataProvider.GetDownloadedData | ( | IEnumerable< DataDownloaderGetParameters > | downloaderDataParameters, |
Symbol | symbol, | ||
DateTimeZone | exchangeTimeZone, | ||
DateTimeZone | dataTimeZone, | ||
Type | dataType | ||
) |
Retrieves downloaded data grouped by symbol based on IDownloadProvider.
downloaderDataParameters | Parameters specifying the data to be retrieved. |
symbol | Represents a unique security identifier, generate by ticker name. |
exchangeTimeZone | The time zone of the exchange where the symbol is traded. |
dataTimeZone | The time zone in which the data is represented. |
dataType | The type of data to be retrieved. (e.g. Data.Market.TradeBar) |
ArgumentException | Thrown when the downloaderDataParameters collection is null or empty. |
Definition at line 206 of file DownloaderDataProvider.cs.
|
protectedvirtual |
Get's the stream for a given file path
Reimplemented from QuantConnect.Lean.Engine.DataFeeds.BaseDownloaderDataProvider.
Definition at line 247 of file DownloaderDataProvider.cs.
|
protectedvirtual |
Main filter to determine if this file needs to be downloaded
filePath | File we are looking at |
Implements QuantConnect.Lean.Engine.DataFeeds.BaseDownloaderDataProvider.
Definition at line 277 of file DownloaderDataProvider.cs.
|
static |
Filters and groups the provided download data by symbol, based on specified criteria.
downloadData | The collection of download data to process. |
symbol | The symbol to filter the data for. |
dataType | The type of data to filter for. |
exchangeTimeZone | The time zone of the exchange. |
dataTimeZone | The desired time zone for the data. |
downloaderStartTimeUtc | The start time of data downloading in UTC. |
downloaderEndTimeUtc | The end time of data downloading in UTC. |
Definition at line 307 of file DownloaderDataProvider.cs.