Upgrade from Eikon -> Workspace. Learn about programming differences.

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 1 4 8

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
#technologyrdp-apipython api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
Accepted
1.4k 5 3 6

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
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

also, what is search? thanks.
Upvotes
5.7k 18 2 7

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

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1 1 4 8

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

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi @mjg

You can try with the rd library:

import refinitiv.data as rd
rd.open_session()

rd.get_data('BAC','TR.CompanyMarketCapitalization')
Upvotes
1 1 4 8

@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!

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi @mjg

You can use CUSIP as well:

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


1702888308170.png

1702888308170.png (6.3 KiB)

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.