Lean  $LEAN_TAG$
QuantConnect.SymbolCache Class Reference

Provides a string->Symbol mapping to allow for user defined strings to be lifted into a Symbol This is mainly used via the Symbol implicit operator, but also functions that create securities should also call Set to add new mappings More...

Static Public Member Functions

static void Set (string ticker, Symbol symbol)
 Adds a mapping for the specified ticker More...
 
static Symbol GetSymbol (string ticker)
 Gets the Symbol object that is mapped to the specified string ticker symbol More...
 
static bool TryGetSymbol (string ticker, out Symbol symbol)
 Gets the Symbol object that is mapped to the specified string ticker symbol More...
 
static string GetTicker (Symbol symbol)
 Gets the string ticker symbol that is mapped to the specified Symbol More...
 
static bool TryGetTicker (Symbol symbol, out string ticker)
 Gets the string ticker symbol that is mapped to the specified Symbol More...
 
static bool TryRemove (Symbol symbol)
 Removes the mapping for the specified symbol from the cache More...
 
static bool TryRemove (string ticker)
 Removes the mapping for the specified symbol from the cache More...
 
static void Clear ()
 Clears the current caches More...
 

Detailed Description

Provides a string->Symbol mapping to allow for user defined strings to be lifted into a Symbol This is mainly used via the Symbol implicit operator, but also functions that create securities should also call Set to add new mappings

Definition at line 28 of file SymbolCache.cs.

Member Function Documentation

◆ Set()

static void QuantConnect.SymbolCache.Set ( string  ticker,
Symbol  symbol 
)
static

Adds a mapping for the specified ticker

Parameters
tickerThe string ticker symbol
symbolThe symbol object that maps to the string ticker symbol

Definition at line 38 of file SymbolCache.cs.

Here is the caller graph for this function:

◆ GetSymbol()

static Symbol QuantConnect.SymbolCache.GetSymbol ( string  ticker)
static

Gets the Symbol object that is mapped to the specified string ticker symbol

Parameters
tickerThe string ticker symbol
Returns
The symbol object that maps to the specified string ticker symbol

Definition at line 49 of file SymbolCache.cs.

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

◆ TryGetSymbol()

static bool QuantConnect.SymbolCache.TryGetSymbol ( string  ticker,
out Symbol  symbol 
)
static

Gets the Symbol object that is mapped to the specified string ticker symbol

Parameters
tickerThe string ticker symbol
symbolThe output symbol object
Returns
The symbol object that maps to the specified string ticker symbol

Definition at line 66 of file SymbolCache.cs.

Here is the caller graph for this function:

◆ GetTicker()

static string QuantConnect.SymbolCache.GetTicker ( Symbol  symbol)
static

Gets the string ticker symbol that is mapped to the specified Symbol

Parameters
symbolThe symbol object
Returns
The string ticker symbol that maps to the specified symbol object

Definition at line 85 of file SymbolCache.cs.

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

◆ TryGetTicker()

static bool QuantConnect.SymbolCache.TryGetTicker ( Symbol  symbol,
out string  ticker 
)
static

Gets the string ticker symbol that is mapped to the specified Symbol

Parameters
symbolThe symbol object
tickerThe output string ticker symbol
Returns
The string ticker symbol that maps to the specified symbol object

Definition at line 97 of file SymbolCache.cs.

◆ TryRemove() [1/2]

static bool QuantConnect.SymbolCache.TryRemove ( Symbol  symbol)
static

Removes the mapping for the specified symbol from the cache

Parameters
symbolThe symbol whose mappings are to be removed
Returns
True if the symbol mapping were removed from the cache

Definition at line 107 of file SymbolCache.cs.

◆ TryRemove() [2/2]

static bool QuantConnect.SymbolCache.TryRemove ( string  ticker)
static

Removes the mapping for the specified symbol from the cache

Parameters
tickerThe ticker whose mappings are to be removed
Returns
True if the symbol mapping were removed from the cache

Definition at line 118 of file SymbolCache.cs.

◆ Clear()

static void QuantConnect.SymbolCache.Clear ( )
static

Clears the current caches

Definition at line 127 of file SymbolCache.cs.


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