Skip to content

IDataProvider

QuantConnect.Interfaces.IDataProvider

Fetches a remote file for a security. Must save the file to Globals.DataFolder.

new_data_request

new_data_request: _EventContainer[
    Callable[
        [Object, DataProviderNewDataRequestEventArgs], Any
    ],
    Any,
]

Event raised each time data fetch is finished (successfully or not)

fetch

fetch(key: str) -> Stream

Retrieves data to be used in an algorithm

Parameters:

Name Type Description Default
key str

A string representing where the data is stored

required

Returns:

Type Description
Stream

A Stream of the data requested.

read_lines

read_lines(file: str) -> Sequence[str]

Helper method to stream read lines from a file

Parameters:

Name Type Description Default
file str

The file path to read from

required

Returns:

Type Description
Sequence[str]

Enumeration of lines in file.