Refinitiv Data Library for TypeScript

SymbolConversion.Definition

Summary

SymbolConversion.Definition objects are used to define symbole conversion requests.
Definition objects describe the list symbols to convert as well as their type and other parameters that will be requested to the data platform. Once the requested conversion described, your application just needs to call the getData() method of the Definition to actually convert the symbols.

Methods

Definition(symbols: string)

Allows you to create a short Definition for SymbolConversion object

Parameter:

Name Is Optional Default Value Type Description
symbols No - string A single instrument to convert ('IBM.N')

Returned value: a Definition object


Definition(symbols: string[ ])

Allows you to create a short Definition for SymbolConversion object

Parameter:

Name Is Optional Default Value Type Description
symbols No - string[] The list of instruments to convert (['IBM.N','MSFT.O', 'GOOG.O'])

Returned value: a Definition object


Definition(params: SymbolConversion.Params)

Allows you to create a full Definition for SymbolConversion object

SymbolConversion.Params properties:

Property Is Optional Default Value Type Description
symbols No - string/string[ ] Single instrument or list of instruments to convert.
fromSymbolType Yes RIC enum Instrument code to convert from. See SymbolType
toSymbolType Yes None
(means all symbol types are requested)
enum Instrument code to convert to. See SymbolType
preferredCountryCode Yes - enum RCS code of a country. CountryCode contains all possible values. See CountryCode
assetState Yes Active enum Add AssetState to Filter parameter. AssetState contains all possible values. See AssetState
assetClass Yes - enum Add SearchAllCategoryv3 and RCSAssetCategoryGenealogy to Filter parameter. AssetClass contains all possible values. See AssetClass
extendedParams Yes - {[key: string]: any} Specifies the parameters that will be merged with the request

Returned value: a Definition object


getData(session: Session)

Sends a request to the data platform to retrieve conversion results described by the Definition object.

Parameter:

Name Is Optional Default Value Type Description
session No - Session Session instance

Returned value: ContentResponse


Examples of usage:

const params = {
    symbols: ['MSFT.O', 'GOOG.O', 'IBM.N'],
    fromSymbolType: SymbolConversion.SymbolType.RIC,
    toSymbolType: [SymbolConversion.SymbolType.ISIN, SymbolConversion.SymbolType.Ticker, SymbolConversion.SymbolType.SEDOL],
    preferredCountryCode: SymbolConversion.CountryCode.USA,
    assetClass: [SymbolConversion.AssetClass.Equities, SymbolConversion.AssetClass.Funds, SymbolConversion.AssetClass.Warrants, SymbolConversion.AssetClass.Indices],
}
const definition = SymbolConversion.Definition(params);
const symbology = await definition.getData(session);