some NYSE RIC's returning without suffix - why?

def get_conversion_defs(symbols) -> pd.DataFrame:
response = symbol_conversion.Definition(symbols=symbols,
from_symbol_type='TickerSymbol'
).get_data()
df = response.data.df
return df


if __name__ == '__main__':
import refinitiv.data as rd
rd.open_session()
output = get_conversion_defs([
'BAC', # expecting suffix of NYSE .K OR .N but no suffix returned
'F', # expecting suffix of NYSE .K OR .N but no suffix returned
'AAPL', # NASDAQ suffix of .O AS EXPECTED
'ABBV' # NYSE suffix of .K - why is this different from BAC/F?
])
print (output.RIC)

for this code, why do BAC/F not come back with a .N or a .K as appropriate for NYSE stocks? yet ABBV has a .K for NYSE, and AAPL has a .O for nasdaq as expected

why is this the output for BAC/F - why no

BAC        BAC
F F
AAPL AAPL.O
ABBV ABBV.K

Best Answer

  • m.bunkowski
    Answer ✓

    Hi @mjg

    Using the symbol.conversion you get PrimaryRIC. If you need to have better control and get the RIC from chosen exchange you can try with this code:

    from refinitiv.data.content import search
    response = search.Definition(
    filter = f"IssuerTicker eq 'BAC' " \
    "and ExchangeCode in ('NYQ' 'NYS' 'NSQ') " \
    "and AssetStateName eq 'Active' " \
    "and DTSimpleType eq 'Ordinary Share'",
    select = "RIC,ExchangeCode,PrimaryRIC"
    ).get_data()
    response.data.df

Answers

  • Hi @mjg ,


    I have checked those instruments (BAC/F) in workspace and they don't have the suffix there either, so I would suggest raising a content query via Helpdesk through https://my.refinitiv.com/ or directly from Workspace/Eikon. There are better positioned to answer the content related questions.


    Best regards,

    Haykaz

  • mjg
    mjg Explorer

    thank you @m.bunkowski for the helpful response.


    ironically, all i really need is a way to get a good enough RIC , from a standard current ticker such as BAC, AAPL, F, or ABBV, to confidently make a subsequent query to the eikon API - such as:

    instruments_arg = ['AAPL.O'] 
    df, err = ek.get_data(
    instruments=instruments_arg,
    fields=['TR.CompanyMarketCapitalization'])

    i had found that to get back valid data from that get_data call, each item in instruments_arg needed to have the suffix, otherwise it would fail.

    if there is there a simpler way to call get_data where it can accept a naive ticker, then i can sidestep this problem

    introducing variables such as making sure i need to know an exhaustive list of:

    "and ExchangeCode in ('NYQ' 'NYS' 'NSQ') " . i will surely need some BATS listed and ARCA listed names and i don't know those codes offhand or if my list of exchanges is necessarily static.

    as well as wanting to handle non-ordinary-share situations such as 'Depository Receipts' or 'Equity ETF' units or what have you seems like added work

  • Hi @aramyan.h

    You can try with the rd library:

    import refinitiv.data as rd
    rd.open_session()

    rd.get_data('BAC','TR.CompanyMarketCapitalization')
  • mjg
    mjg Explorer

    @m.bunkowski thank you again.

    as a hypothetical - what if i had CUSIP information instead rather than Ticker, would that make solving the symbol conversion problem easier/trivial?

    i appreciate the heads up about being able to use the rd call instead. will that work for all fields that i currently query the same way i query for market cap?


    thank you!

  • Hi @mjg

    You can use CUSIP as well:

    rd.get_data(['459200101'],['TR.CompanyMarketCapitalization','TR.CommonName','TR.RIC'])


    1702888308170.png