ID Converter
Efficient conversion of financial symbols between different identifiers.
The Symbol
class provides a method to convert financial symbol identifiers from one format to another based on API responses. This functionality is essential for maintaining consistent identifier formats across various data sources and systems.
Usage
Symbol Class
A class to handle the conversion of financial symbols between different identifiers using the SymbolApi
.
Methods:
convert(_from: str, to: str, source: Union[str, list], date: Optional[str] = None, universe: Optional[int] = None) -> Result[dict]: Converts financial symbols from one identifier format to another.
Attributes:
_from (str): The source identifier type (e.g., 'id').
to (str): The target identifier type (e.g., 'entity_name').
source (Union[str, list]): The actual identifier(s) to be converted. Can be a single identifier or a list of identifiers.
date (Optional[str]): The date for which the conversion is applicable (default is None, implying the current date).
universe (Optional[int]): An optional parameter to specify the universe of the identifiers (default is None).
Returns:
dict: A dictionary where each key is a symbol provided in the _from parameter, and the corresponding value is the converted symbol in the to format. The length of the dictionary matches the length of the source list or the number of keys in the source string when multiple keys are provided separated by commas.
Possible Mappings:
id
isin
short_code
entity_name
id
N/A
✔️
✔️
✔️
isin
✔️
N/A
✔️
✔️
short_code
✔️
✔️
N/A
X
entity_name
X
X
X
N/A
Last updated