RestSubscriptionStreamReader
QuantConnect.Lean.Engine.DataFeeds.Transport.RestSubscriptionStreamReader
RestSubscriptionStreamReader(
source: str,
headers: List[KeyValuePair[str, str]],
is_live_mode: bool,
)
Bases: Object, IStreamReader
Represents a stream reader capable of polling a rest client
Initializes a new instance of the RestSubscriptionStreamReader class.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
str
|
The source url to poll with a GET |
required |
headers
|
List[KeyValuePair[str, str]]
|
Defines header values to add to the request |
required |
is_live_mode
|
bool
|
True for live mode, false otherwise |
required |
should_be_rate_limited
should_be_rate_limited: bool
Gets whether or not this stream reader should be rate limited
stream_reader
stream_reader: StreamReader
Direct access to the StreamReader instance
transport_medium
transport_medium: SubscriptionTransportMedium
Gets SubscriptionTransportMedium.REST
end_of_stream
end_of_stream: bool
Gets whether or not there's more data to be read in the stream
dispose
dispose() -> None
This stream reader doesn't require disposal
read_line
read_line() -> str
Gets the next line/batch of content from the stream