Symbol Conversion parameters in C# vs Python

Hello,

How do we pass the same additional parameters such as

  • preferred_country_code and
  • asset_class

in the C# version of the SymbolConversion (https://github.com/LSEG-API-Samples/Example.DataLibrary.DotNet/blob/lseg-data-examples/src/2.%20Content/2.5-Symbology/2.5.01-Symbology-Convert/2.5.01-Symbology-Convert.cs)

just like it is mentioned in the Python version (https://cdn.refinitiv.com/public/rd-lib-python-doc/1.0.0.0/book/en/sections/content-layer/symbol-conversion/symbol-conversion-definition.html)?

Thanks

Christian.

Tagged:

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    edited December 2024

    @cleesikyee

    Thank you for reaching out to us.

    I checked the ISymbolConversionDefinition interface used by SymbolConversion and it doesn't support the preferred_country_code and asset_class parameters.

    However, under the hood, the library uses the search.lookup endpoint to convert symbologies. Therefore, you can specify the country code and asset class in the search.lookup endpoint. The example is on GitHub.

    For example:

                        var lookup = Lookup.Definition().View(Search.View.SearchAll)
                                                        .Terms("US02079K3059")
                                                        .Scope("IssueISIN")
                                                        .Select("DocumentTitle, RIC, CUSIP, SEDOL, TickerSymbol, IssueISIN, IssuerOAPermID, RCSExchangeCountry, ExchangeCountry")
                                                        .Boost("ExchangeCountry eq 'GBR'")
                                                        .Filter("AssetState eq 'AC' and (SearchAllCategoryv3 in ('Equities'))")
                                                        .GetData();

    The country code (ExchangeCountry) is specified in the Boost method and The asset class (SearchAllCategoryv3) is specified in the Filter method.

    These are the asset class strings defined in Python.

    AssetClass.COMMODITIES: "Commodities",
    AssetClass.EQUITY_OR_INDEX_OPTIONS: "Options",
    AssetClass.BOND_AND_STIR_FUTURES_AND_OPTIONS: "Exchange-Traded Rates",
    AssetClass.EQUITIES: "Equities",
    AssetClass.EQUITY_INDEX_FUTURES: "Futures",
    AssetClass.FUNDS: "Funds",
    AssetClass.BONDS: "Bond Pricing",
    AssetClass.FX_AND_MONEY: "FX & Money",

    I hope that this information is of help.

  • Hi @Jirapongse ,

    Thanks a lot for the clarification.

    This is good for a workaround then.

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.