question

Upvotes
Accepted
29 1 1 3

Wrong Ric Root code in API

Hi all,


I've noticed some inconsistencies in the API data, I'm wondering if I did anything wrong or if this is a data quality issue.


I'm trying to retrieve the Ric Root code for indices.


For this I use this function :

def getRicRootFromIsin(isin):
    df = rd.discovery.search(
        view = rd.discovery.Views.SEARCH_ALL,
        filter=f"ISIN eq '{isin}'",
        select = "BusinessEntity,DocumentTitle,RIC,RicRoot",
        top = 100)
    print(df)
    if df.empty:
        print(f"No Ric root found for isin {isin}")
        return None
    else:
        return df["RicRoot"].iloc[0]

This search an Isin and returns information on that index, like the Ric and Ric root code.


Here is the exemple I got :

For isin

EU0009658145

which is the EURO STOXX 50 index, this is what the function returns:

Ric : .STOXX50E

Ric Root : STOXX50E


However, the actual Ric Root of that index, as used in the Ric code of the derivatives of that index, is "STX", not "STOXX50E"...


Is there any reason that the Ric Root given by the API is wrong ?


Thanks,

#contentpython apiricssearchindex
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.

1 Answer

· Write an Answer
Upvotes
Accepted
6.2k 18 2 8

Hi @adam.leroux ,


Your code will return Ric Root of found index which is STOXX50E. What you need to mention in your filter instead is the Underlying ISIN and specify the SearchAllCategory to be Futures. However there doesn't seem to be Underlying ISIN field and therefore I would suggest using UnderlyingQuoteRIC field:

df = rd.discovery.search(
        view = rd.discovery.Views.SEARCH_ALL,
        filter=f"UnderlyingQuoteRIC eq '.STOXX50E' and SearchAllCategoryv2 eq 'Futures'",
        select = "BusinessEntity,DocumentTitle,RIC,RicRoot",
        top = 100)
df

screenshot-2024-05-16-at-101835.png

If you have only the isin, you can use the following query to get the RIC:

df = rd.get_data(universe=['EU0009658145'],fields=['TR.RIC'])
df


screenshot-2024-05-16-at-102049.png


Hope this helps.


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.

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.