Is there a code where I can convert a list of RICs into its US RIC counterpart?

Hello team, for example RIC

ABX.TO is listed in Toronto Exchange

the RIC which the Exchange is United States is RIC B.

I have managed to create this code:

import refinitiv.data as rd

rd.open_session()
rd.discovery.search(
    view = rd.discovery.Views.EQUITY_QUOTES,
    top = 10,
    filter = "(AssetState ne 'DC' and SearchAllCategoryv2 eq 'Equities' and (RCSExchangeCountry xeq 'G:6J' and DTSubjectName in ('Barrick Mining')))",
    select = "DTSubjectName,ExchangeName,RIC,IssueISIN,Gics,AssetState,BusinessEntity,PI,SearchAllCategoryv3,SearchAllCategoryv2,SearchAllCategory,RCSExchangeCountryLeaf,RCSExchangeCountry"
)

Where the filters is Country of Exchange: United States and Name that contains: Barrick Mining.

image.png

But a code where we can enter the RIC and it will convert it into its US counterpart is more efficient to client since he may need to convert a list of identifiers and not just a single security.

Best Answer

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @Marc_Belen24

    Thank you for reaching to us.

    You can convert ABX.TO to ISIN and then use ISIN to search for RICs in US.

    There are several methods to convert ABX.TO to ISIN, such as the get_data method. For example:

    df = ld.get_data(['ABX.TO'],['TR.ISIN'])
    ld.discovery.search(
        view = ld.discovery.Views.EQUITY_QUOTES,
        top = 10,
        filter = f"(AssetState ne 'DC' and SearchAllCategoryv2 eq 'Equities' and (RCSExchangeCountry xeq 'G:6J' and IssueISIN eq '{df['ISIN'].values[0]}'))",
        select = "DTSubjectName,ExchangeName,RIC,IssueISIN,Gics,AssetState,BusinessEntity,PI,SearchAllCategoryv3,SearchAllCategoryv2,SearchAllCategory,RCSExchangeCountryLeaf,RCSExchangeCountry"
    )