Skip to content

SecurityDefinition

QuantConnect.Securities.SecurityDefinition

Bases: Object

Helper class containing various unique identifiers for a given security_identifier, such as FIGI, ISIN, CUSIP, SEDOL.

security_identifier

security_identifier: SecurityIdentifier

The unique security_identifier identified by the industry-standard security identifiers contained within this class.

cusip

cusip: str

The Committee on Uniform Securities Identification Procedures (CUSIP) number of a security

composite_figi

composite_figi: str

The composite Financial Instrument Global Identifier (FIGI) of a security

sedol

sedol: str

The Stock Exchange Daily Official List (SEDOL) security identifier of a security

isin

isin: str

The International Securities Identification Number (ISIN) of a security

cik

cik: Optional[int]

A Central Index Key or CIK number is a unique number assigned to an individual, company, filing agent or foreign government by the United States Securities and Exchange Commission (SEC). The number is used to identify its filings in several online databases, including EDGAR.

from_csv_line

from_csv_line(line: str) -> SecurityDefinition

Parses a single line of CSV and converts it into an instance

Parameters:

Name Type Description Default
line str

Line of CSV

required

Returns:

Type Description
SecurityDefinition

SecurityDefinition instance.

read

read(
    data_provider: IDataProvider,
    securities_definition_key: str,
) -> List[SecurityDefinition]

Reads data from the specified file and converts it to a list of SecurityDefinition

Parameters:

Name Type Description Default
data_provider IDataProvider

Data provider used to obtain symbol mappings data

required
securities_definition_key str

Location to read the securities definition data from

required

Returns:

Type Description
List[SecurityDefinition]

List of security definitions.

try_read

try_read(
    data_provider: IDataProvider,
    securities_database_key: str,
    security_definitions: Optional[
        List[SecurityDefinition]
    ],
) -> Tuple[bool, List[SecurityDefinition]]

Attempts to read data from the specified file and convert it into a list of SecurityDefinition

Parameters:

Name Type Description Default
data_provider IDataProvider

Data provider used to obtain symbol mappings data

required
securities_database_key str

Location of the file to read from

required
security_definitions Optional[List[SecurityDefinition]]

Security definitions read

required

Returns:

Type Description
Tuple[bool, List[SecurityDefinition]]

true if data was read successfully, false otherwise.