SecurityDefinitionSymbolResolver
QuantConnect.Securities.SecurityDefinitionSymbolResolver
Bases: Object
Resolves standardized security definitions such as FIGI, CUSIP, ISIN, SEDOL into a properly mapped Lean Symbol, and vice-versa.
cik
cik(
symbol: Union[Symbol, str, BaseContract],
) -> Optional[int]
cik(
cik: int, trading_date: Union[datetime, date]
) -> List[Symbol]
Signature descriptions:
-
Get's the CIK value associated with the given Symbol
-
Converts CIK into a Lean Symbol array
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
symbol
|
Optional[Union[Symbol, str, BaseContract]]
|
The Lean Symbol |
None
|
cik
|
Optional[int]
|
The Central Index Key (CIK) of a company |
None
|
trading_date
|
Optional[Union[datetime, date]]
|
The date that the stock was trading at with the CIK provided. This is used |
None
|
Returns:
| Type | Description |
|---|---|
Optional[int] | List[Symbol]
|
Depends on the signature used. Case 1: [The Central Index Key number (CIK) corresponding to the given Lean Symbol if any, else null.]; Case 2: [The Lean Symbols corresponding to the CIK on the trading date provided.] |
composite_figi
composite_figi(
composite_figi: str, trading_date: Union[datetime, date]
) -> Symbol
composite_figi(
symbol: Union[Symbol, str, BaseContract],
) -> str
Signature descriptions:
-
Converts an asset's composite FIGI into a Lean Symbol
-
Converts a Lean Symbol to its composite FIGI representation
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
composite_figi
|
Optional[str]
|
The composite Financial Instrument Global Identifier (FIGI) of a security |
None
|
trading_date
|
Optional[Union[datetime, date]]
|
The date that the stock was trading at with the composite FIGI provided. This is used |
None
|
symbol
|
Optional[Union[Symbol, str, BaseContract]]
|
The Lean Symbol |
None
|
Returns:
| Type | Description |
|---|---|
Symbol | str
|
Depends on the signature used. Case 1: [The Lean Symbol corresponding to the composite FIGI on the trading date provided.]; Case 2: [The composite Financial Instrument Global Identifier (FIGI) corresponding to the given Lean Symbol.] |
cusip
cusip(
cusip: str, trading_date: Union[datetime, date]
) -> Symbol
cusip(symbol: Union[Symbol, str, BaseContract]) -> str
Signature descriptions:
-
Converts CUSIP into a Lean Symbol
-
Converts a Lean Symbol to its CUSIP number
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cusip
|
Optional[str]
|
The Committee on Uniform Securities Identification Procedures (CUSIP) number of a security |
None
|
trading_date
|
Optional[Union[datetime, date]]
|
The date that the stock was trading at with the CUSIP provided. This is used |
None
|
symbol
|
Optional[Union[Symbol, str, BaseContract]]
|
The Lean Symbol |
None
|
Returns:
| Type | Description |
|---|---|
Symbol | str
|
Depends on the signature used. Case 1: [The Lean Symbol corresponding to the CUSIP number on the trading date provided.]; Case 2: [The Committee on Uniform Securities Identification Procedures (CUSIP) number corresponding to the given Lean Symbol.] |
isin
isin(
isin: str, trading_date: Union[datetime, date]
) -> Symbol
isin(symbol: Union[Symbol, str, BaseContract]) -> str
Signature descriptions:
-
Converts ISIN into a Lean Symbol
-
Converts a Lean Symbol to its ISIN representation
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
isin
|
Optional[str]
|
The International Securities Identification Number (ISIN) of a security |
None
|
trading_date
|
Optional[Union[datetime, date]]
|
The date that the stock was trading at with the ISIN provided. This is used |
None
|
symbol
|
Optional[Union[Symbol, str, BaseContract]]
|
The Lean Symbol |
None
|
Returns:
| Type | Description |
|---|---|
Symbol | str
|
Depends on the signature used. Case 1: [The Lean Symbol corresponding to the ISIN on the trading date provided.]; Case 2: [The International Securities Identification Number (ISIN) corresponding to the given Lean Symbol.] |
sedol
sedol(
sedol: str, trading_date: Union[datetime, date]
) -> Symbol
sedol(symbol: Union[Symbol, str, BaseContract]) -> str
Signature descriptions:
-
Converts SEDOL into a Lean Symbol
-
Converts a Lean Symbol to its SEDOL representation
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sedol
|
Optional[str]
|
The Stock Exchange Daily Official List (SEDOL) security identifier of a security |
None
|
trading_date
|
Optional[Union[datetime, date]]
|
The date that the stock was trading at with the SEDOL provided. This is used |
None
|
symbol
|
Optional[Union[Symbol, str, BaseContract]]
|
The Lean Symbol |
None
|
Returns:
| Type | Description |
|---|---|
Symbol | str
|
Depends on the signature used. Case 1: [The Lean Symbol corresponding to the SEDOL on the trading date provided.]; Case 2: [The Stock Exchange Daily Official List (SEDOL) security identifier corresponding to the given Lean Symbol.] |
get_instance
get_instance(
data_provider: IDataProvider = None,
securities_definition_key: str = None,
) -> SecurityDefinitionSymbolResolver
Gets the single instance of the symbol resolver
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_provider
|
IDataProvider
|
Data provider used to obtain symbol mappings data |
None
|
securities_definition_key
|
str
|
Location to read the securities definition data from |
None
|
Returns:
| Type | Description |
|---|---|
SecurityDefinitionSymbolResolver
|
The single instance of the symbol resolver. |
reset
reset() -> None
Resets the security definition symbol resolver, forcing a reload when reused. Called in tests where multiple algorithms are run sequentially, and we need to guarantee that every test starts with the same environment.