Lean
$LEAN_TAG$
|
An instance of the IDataProvider that will download and update data files as needed via QC's Api. More...
Public Member Functions | |
ApiDataProvider () | |
Initialize a new instance of the ApiDataProvider More... | |
override Stream | Fetch (string key) |
Retrieves data to be used in an algorithm. If file does not exist, an attempt is made to download them from the api 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... | |
Protected Member Functions | |
override bool | NeedToDownload (string filePath) |
Main filter to determine if this file needs to be downloaded More... | |
virtual bool | DownloadData (string filePath) |
Attempt to download data using the Api for and return a FileStream of that data. 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... | |
virtual Stream | GetStream (string key) |
Get's the stream for a given file path 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... | |
An instance of the IDataProvider that will download and update data files as needed via QC's Api.
Definition at line 33 of file ApiDataProvider.cs.
QuantConnect.Lean.Engine.DataFeeds.ApiDataProvider.ApiDataProvider | ( | ) |
Initialize a new instance of the ApiDataProvider
Definition at line 48 of file ApiDataProvider.cs.
|
virtual |
Retrieves data to be used in an algorithm. If file does not exist, an attempt is made to download them from the api
key | File path representing where the data requested |
Reimplemented from QuantConnect.Lean.Engine.DataFeeds.DefaultDataProvider.
Definition at line 125 of file ApiDataProvider.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 157 of file ApiDataProvider.cs.
|
protectedvirtual |
Attempt to download data using the Api for and return a FileStream of that data.
filePath | The path to store the file |
Definition at line 227 of file ApiDataProvider.cs.