Lean  $LEAN_TAG$
QuantConnect.Securities.SymbolPropertiesDatabase Class Reference

Provides access to specific properties for various symbols More...

Public Member Functions

bool ContainsKey (string market, string symbol, SecurityType securityType)
 Check whether symbol properties exists for the specified market/symbol/security-type More...
 
bool ContainsKey (string market, Symbol symbol, SecurityType securityType)
 Check whether symbol properties exists for the specified market/symbol/security-type More...
 
bool TryGetMarket (string symbol, SecurityType securityType, out string market)
 Tries to get the market for the provided symbol/security type More...
 
SymbolProperties GetSymbolProperties (string market, Symbol symbol, SecurityType securityType, string defaultQuoteCurrency)
 Gets the symbol properties for the specified market/symbol/security-type More...
 
IEnumerable< KeyValuePair< SecurityDatabaseKey, SymbolProperties > > GetSymbolPropertiesList (string market, SecurityType securityType)
 Gets a list of symbol properties for the specified market/security-type More...
 
IEnumerable< KeyValuePair< SecurityDatabaseKey, SymbolProperties > > GetSymbolPropertiesList (string market)
 Gets a list of symbol properties for the specified market More...
 
bool SetEntry (string market, string symbol, SecurityType securityType, SymbolProperties properties)
 Set SymbolProperties entry for a particular market, symbol and security type. More...
 

Static Public Member Functions

static SymbolPropertiesDatabase FromDataFolder ()
 Gets the instance of the SymbolPropertiesDatabase class produced by reading in the symbol properties data found in /Data/symbol-properties/ More...
 

Protected Member Functions

 SymbolPropertiesDatabase (string file)
 Initialize a new instance of SymbolPropertiesDatabase using the given file More...
 

Static Protected Member Functions

static SymbolProperties FromCsvLine (string line, out SecurityDatabaseKey key)
 Creates a new instance of SymbolProperties from the specified csv line More...
 

Detailed Description

Provides access to specific properties for various symbols

Definition at line 27 of file SymbolPropertiesDatabase.cs.

Constructor & Destructor Documentation

◆ SymbolPropertiesDatabase()

QuantConnect.Securities.SymbolPropertiesDatabase.SymbolPropertiesDatabase ( string  file)
protected

Initialize a new instance of SymbolPropertiesDatabase using the given file

Parameters
fileFile to read from

Definition at line 40 of file SymbolPropertiesDatabase.cs.

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

Member Function Documentation

◆ ContainsKey() [1/2]

bool QuantConnect.Securities.SymbolPropertiesDatabase.ContainsKey ( string  market,
string  symbol,
SecurityType  securityType 
)

Check whether symbol properties exists for the specified market/symbol/security-type

Parameters
marketThe market the exchange resides in, i.e, 'usa', 'fxcm', ect...
symbolThe particular symbol being traded
securityTypeThe security type of the symbol

Definition at line 72 of file SymbolPropertiesDatabase.cs.

Here is the caller graph for this function:

◆ ContainsKey() [2/2]

bool QuantConnect.Securities.SymbolPropertiesDatabase.ContainsKey ( string  market,
Symbol  symbol,
SecurityType  securityType 
)

Check whether symbol properties exists for the specified market/symbol/security-type

Parameters
marketThe market the exchange resides in, i.e, 'usa', 'fxcm', ect...
symbolThe particular symbol being traded (Symbol class)
securityTypeThe security type of the symbol

Definition at line 84 of file SymbolPropertiesDatabase.cs.

Here is the call graph for this function:

◆ TryGetMarket()

bool QuantConnect.Securities.SymbolPropertiesDatabase.TryGetMarket ( string  symbol,
SecurityType  securityType,
out string  market 
)

Tries to get the market for the provided symbol/security type

Parameters
symbolThe particular symbol being traded
securityTypeThe security type of the symbol
marketThe market the exchange resides in Market
Returns
True if market was retrieved, false otherwise

Definition at line 99 of file SymbolPropertiesDatabase.cs.

Here is the caller graph for this function:

◆ GetSymbolProperties()

SymbolProperties QuantConnect.Securities.SymbolPropertiesDatabase.GetSymbolProperties ( string  market,
Symbol  symbol,
SecurityType  securityType,
string  defaultQuoteCurrency 
)

Gets the symbol properties for the specified market/symbol/security-type

Parameters
marketThe market the exchange resides in, i.e, 'usa', 'fxcm', ect...
symbolThe particular symbol being traded (Symbol class)
securityTypeThe security type of the symbol
defaultQuoteCurrencySpecifies the quote currency to be used when returning a default instance of an entry is not found in the database
Returns
The symbol properties matching the specified market/symbol/security-type or null if not found

For any derivative options asset that is not for equities, we default to the underlying symbol's properties if no entry is found in the database

Definition at line 122 of file SymbolPropertiesDatabase.cs.

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

◆ GetSymbolPropertiesList() [1/2]

IEnumerable<KeyValuePair<SecurityDatabaseKey, SymbolProperties> > QuantConnect.Securities.SymbolPropertiesDatabase.GetSymbolPropertiesList ( string  market,
SecurityType  securityType 
)

Gets a list of symbol properties for the specified market/security-type

Parameters
marketThe market the exchange resides in, i.e, 'usa', 'fxcm', ect...
securityTypeThe security type of the symbol
Returns
An IEnumerable of symbol properties matching the specified market/security-type

Definition at line 160 of file SymbolPropertiesDatabase.cs.

Here is the caller graph for this function:

◆ GetSymbolPropertiesList() [2/2]

IEnumerable<KeyValuePair<SecurityDatabaseKey, SymbolProperties> > QuantConnect.Securities.SymbolPropertiesDatabase.GetSymbolPropertiesList ( string  market)

Gets a list of symbol properties for the specified market

Parameters
marketThe market the exchange resides in, i.e, 'usa', 'fxcm', ect...
Returns
An IEnumerable of symbol properties matching the specified market

Definition at line 179 of file SymbolPropertiesDatabase.cs.

◆ SetEntry()

bool QuantConnect.Securities.SymbolPropertiesDatabase.SetEntry ( string  market,
string  symbol,
SecurityType  securityType,
SymbolProperties  properties 
)

Set SymbolProperties entry for a particular market, symbol and security type.

Parameters
marketMarket of the entry
symbolSymbol of the entry
securityTypeType of security for the entry
propertiesThe new symbol properties to store
Returns
True if successful

Definition at line 201 of file SymbolPropertiesDatabase.cs.

◆ FromDataFolder()

static SymbolPropertiesDatabase QuantConnect.Securities.SymbolPropertiesDatabase.FromDataFolder ( )
static

Gets the instance of the SymbolPropertiesDatabase class produced by reading in the symbol properties data found in /Data/symbol-properties/

Returns
A SymbolPropertiesDatabase class that represents the data in the symbol-properties folder

Definition at line 217 of file SymbolPropertiesDatabase.cs.

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

◆ FromCsvLine()

static SymbolProperties QuantConnect.Securities.SymbolPropertiesDatabase.FromCsvLine ( string  line,
out SecurityDatabaseKey  key 
)
staticprotected

Creates a new instance of SymbolProperties from the specified csv line

Parameters
lineThe csv line to be parsed
keyThe key used to uniquely identify this security
Returns
A new SymbolProperties for the specified csv line

Definition at line 261 of file SymbolPropertiesDatabase.cs.


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