Lean  $LEAN_TAG$
QuantConnect.Lean.Engine.DataFeeds.LiveTradingDataFeed Class Reference

Provides an implementation of IDataFeed that is designed to deal with live, remote data sources More...

Inheritance diagram for QuantConnect.Lean.Engine.DataFeeds.LiveTradingDataFeed:
[legend]

Public Member Functions

override void Initialize (IAlgorithm algorithm, AlgorithmNodePacket job, IResultHandler resultHandler, IMapFileProvider mapFileProvider, IFactorFileProvider factorFileProvider, IDataProvider dataProvider, IDataFeedSubscriptionManager subscriptionManager, IDataFeedTimeProvider dataFeedTimeProvider, IDataChannelProvider dataChannelProvider)
 Initializes the data feed for the specified job and algorithm More...
 
override Subscription CreateSubscription (SubscriptionRequest request)
 Creates a new subscription to provide data for the specified security. More...
 
override void RemoveSubscription (Subscription subscription)
 Removes the subscription from the data feed, if it exists More...
 
override void Exit ()
 External controller calls to signal a terminate of the thread. More...
 

Protected Member Functions

virtual IDataQueueHandler GetDataQueueHandler ()
 Gets the IDataQueueHandler to use by default DataQueueHandlerManager More...
 
virtual BaseDataExchange GetBaseDataExchange ()
 Gets the BaseDataExchange to use More...
 
- Protected Member Functions inherited from QuantConnect.Lean.Engine.DataFeeds.FileSystemDataFeed
IEnumerator< BaseDataCreateEnumerator (SubscriptionRequest request, Resolution? fillForwardResolution=null)
 Creates a file based data enumerator for the given subscription request More...
 
IEnumerator< BaseDataCreateUniverseEnumerator (SubscriptionRequest request, Func< SubscriptionRequest, Resolution?, IEnumerator< BaseData >> createUnderlyingEnumerator, Resolution? fillForwardResolution=null)
 Creates a universe enumerator from the Subscription request, the underlying enumerator func and the fill forward resolution (in some cases) More...
 
IEnumerator< BaseDataAddScheduleWrapper (SubscriptionRequest request, IEnumerator< BaseData > underlying, ITimeProvider timeProvider)
 Returns a scheduled enumerator from the given arguments. It can also return the given underlying enumerator More...
 
IEnumerator< BaseDataTryAppendUnderlyingEnumerator (SubscriptionRequest request, IEnumerator< BaseData > parent, Func< SubscriptionRequest, Resolution?, IEnumerator< BaseData >> createEnumerator, Resolution? fillForwardResolution)
 If required will add a new enumerator for the underlying symbol More...
 
IEnumerator< BaseDataConfigureEnumerator (SubscriptionRequest request, bool aggregate, IEnumerator< BaseData > enumerator, Resolution? fillForwardResolution)
 Configure the enumerator with aggregation/fill-forward/filter behaviors. Returns new instance if re-configured More...
 
IEnumerator< BaseDataTryAddFillForwardEnumerator (SubscriptionRequest request, IEnumerator< BaseData > enumerator, bool fillForward, Resolution? fillForwardResolution)
 Will add a fill forward enumerator if requested More...
 

Properties

bool IsActive [get]
 Public flag indicator that the thread is still busy. More...
 
- Properties inherited from QuantConnect.Lean.Engine.DataFeeds.FileSystemDataFeed
bool IsActive [get]
 Flag indicating the hander thread is completely finished and ready to dispose. More...
 
- Properties inherited from QuantConnect.Lean.Engine.DataFeeds.IDataFeed
bool IsActive [get]
 Public flag indicator that the thread is still busy. More...
 

Detailed Description

Provides an implementation of IDataFeed that is designed to deal with live, remote data sources

Definition at line 41 of file LiveTradingDataFeed.cs.

Member Function Documentation

◆ Initialize()

override void QuantConnect.Lean.Engine.DataFeeds.LiveTradingDataFeed.Initialize ( IAlgorithm  algorithm,
AlgorithmNodePacket  job,
IResultHandler  resultHandler,
IMapFileProvider  mapFileProvider,
IFactorFileProvider  factorFileProvider,
IDataProvider  dataProvider,
IDataFeedSubscriptionManager  subscriptionManager,
IDataFeedTimeProvider  dataFeedTimeProvider,
IDataChannelProvider  dataChannelProvider 
)
virtual

Initializes the data feed for the specified job and algorithm

Reimplemented from QuantConnect.Lean.Engine.DataFeeds.FileSystemDataFeed.

Definition at line 76 of file LiveTradingDataFeed.cs.

Here is the call graph for this function:

◆ CreateSubscription()

override Subscription QuantConnect.Lean.Engine.DataFeeds.LiveTradingDataFeed.CreateSubscription ( SubscriptionRequest  request)
virtual

Creates a new subscription to provide data for the specified security.

Parameters
requestDefines the subscription to be added, including start/end times the universe and security
Returns
The created Subscription if successful, null otherwise

Reimplemented from QuantConnect.Lean.Engine.DataFeeds.FileSystemDataFeed.

Definition at line 118 of file LiveTradingDataFeed.cs.

Here is the call graph for this function:

◆ RemoveSubscription()

override void QuantConnect.Lean.Engine.DataFeeds.LiveTradingDataFeed.RemoveSubscription ( Subscription  subscription)
virtual

Removes the subscription from the data feed, if it exists

Parameters
subscriptionThe subscription to remove

Reimplemented from QuantConnect.Lean.Engine.DataFeeds.FileSystemDataFeed.

Definition at line 142 of file LiveTradingDataFeed.cs.

Here is the call graph for this function:

◆ Exit()

override void QuantConnect.Lean.Engine.DataFeeds.LiveTradingDataFeed.Exit ( )
virtual

External controller calls to signal a terminate of the thread.

Reimplemented from QuantConnect.Lean.Engine.DataFeeds.FileSystemDataFeed.

Definition at line 160 of file LiveTradingDataFeed.cs.

Here is the call graph for this function:

◆ GetDataQueueHandler()

virtual IDataQueueHandler QuantConnect.Lean.Engine.DataFeeds.LiveTradingDataFeed.GetDataQueueHandler ( )
protectedvirtual

Gets the IDataQueueHandler to use by default DataQueueHandlerManager

Useful for testing

Returns
The loaded IDataQueueHandler

Definition at line 182 of file LiveTradingDataFeed.cs.

Here is the caller graph for this function:

◆ GetBaseDataExchange()

virtual BaseDataExchange QuantConnect.Lean.Engine.DataFeeds.LiveTradingDataFeed.GetBaseDataExchange ( )
protectedvirtual

Gets the BaseDataExchange to use

Useful for testing

Definition at line 193 of file LiveTradingDataFeed.cs.

Here is the caller graph for this function:

Property Documentation

◆ IsActive

bool QuantConnect.Lean.Engine.DataFeeds.LiveTradingDataFeed.IsActive
get

Public flag indicator that the thread is still busy.

Definition at line 69 of file LiveTradingDataFeed.cs.


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