Lean  $LEAN_TAG$
QuantConnect.Securities.SecurityService Class Reference

This class implements interface ISecurityService providing methods for creating new Security More...

Inheritance diagram for QuantConnect.Securities.SecurityService:
[legend]

Public Member Functions

 SecurityService (CashBook cashBook, MarketHoursDatabase marketHoursDatabase, SymbolPropertiesDatabase symbolPropertiesDatabase, ISecurityInitializerProvider securityInitializerProvider, IRegisteredSecurityDataTypesProvider registeredTypes, SecurityCacheProvider cacheProvider, IPrimaryExchangeProvider primaryExchangeProvider=null, IAlgorithm algorithm=null)
 Creates a new instance of the SecurityService class More...
 
Security CreateSecurity (Symbol symbol, List< SubscriptionDataConfig > subscriptionDataConfigList, decimal leverage=0, bool addToSymbolCache=true, Security underlying=null)
 Creates a new security More...
 
Security CreateSecurity (Symbol symbol, SubscriptionDataConfig subscriptionDataConfig, decimal leverage=0, bool addToSymbolCache=true, Security underlying=null)
 Creates a new security More...
 
void SetLiveMode (bool isLiveMode)
 Set live mode state of the algorithm More...
 

Detailed Description

This class implements interface ISecurityService providing methods for creating new Security

Definition at line 29 of file SecurityService.cs.

Constructor & Destructor Documentation

◆ SecurityService()

QuantConnect.Securities.SecurityService.SecurityService ( CashBook  cashBook,
MarketHoursDatabase  marketHoursDatabase,
SymbolPropertiesDatabase  symbolPropertiesDatabase,
ISecurityInitializerProvider  securityInitializerProvider,
IRegisteredSecurityDataTypesProvider  registeredTypes,
SecurityCacheProvider  cacheProvider,
IPrimaryExchangeProvider  primaryExchangeProvider = null,
IAlgorithm  algorithm = null 
)

Creates a new instance of the SecurityService class

Definition at line 45 of file SecurityService.cs.

Member Function Documentation

◆ CreateSecurity() [1/2]

Security QuantConnect.Securities.SecurityService.CreateSecurity ( Symbol  symbol,
List< SubscriptionDataConfig subscriptionDataConfigList,
decimal  leverage = 0,
bool  addToSymbolCache = true,
Security  underlying = null 
)

Creates a new security

Following the obsoletion of Security.Subscriptions, both overloads will be merged removing SubscriptionDataConfig arguments

Implements QuantConnect.Interfaces.ISecurityService.

Definition at line 69 of file SecurityService.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateSecurity() [2/2]

Security QuantConnect.Securities.SecurityService.CreateSecurity ( Symbol  symbol,
SubscriptionDataConfig  subscriptionDataConfig,
decimal  leverage = 0,
bool  addToSymbolCache = true,
Security  underlying = null 
)

Creates a new security

Following the obsoletion of Security.Subscriptions, both overloads will be merged removing SubscriptionDataConfig arguments

Implements QuantConnect.Interfaces.ISecurityService.

Definition at line 228 of file SecurityService.cs.

Here is the call graph for this function:

◆ SetLiveMode()

void QuantConnect.Securities.SecurityService.SetLiveMode ( bool  isLiveMode)

Set live mode state of the algorithm

Parameters
isLiveModeTrue, live mode is enabled

Definition at line 237 of file SecurityService.cs.

Here is the caller graph for this function:

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