Refinitiv ISIN into RIC search for Bond

Hi, there are a number of questions and answers on this topic though it appears nothing is consistent / simple. I am accessing refinitiv data library via a workspace access

The tutorial sugges the below to retrieve a RIC from an ISIN....

import refinitiv.data as rd
from refinitiv.data.content import symbol_conversion

# Symbol types:
# - symbol_conversion.RIC => RIC
# - symbol_conversion.ISIN => IssueISIN
# - symbol_conversion.CUSIP => CUSIP
# - symbol_conversion.SEDOL => SEDOL
# - symbol_conversion.TICKER_SYMBOL => TickerSymbol
# - symbol_conversion.OA_PERM_ID => IssuerOAPermID
# - symbol_conversion.LIPPER_ID => FundClassLipperID

response = symbol_conversion.Definition(
symbols=["AU3TB0000150"],
from_symbol_type=symbol_conversion.SymbolTypes.ISIN,
to_symbol_types=[

symbol_conversion.SymbolTypes.RIC,

symbol_conversion.SymbolTypes.OA_PERM_ID

],

).get_data()

response.data.df


This returns the below Error.

File c:xxxxxxxxxx\lib\site-packages\refinitiv\data\delivery\_data\_data_provider_layer.py:126, in DataProviderLayer._check_response(self, response, config)
125 def _check_response(self, response: Response, config):
--> 126 _check_response(response, config)

File c:xxxxxxx\lib\site-packages\refinitiv\data\delivery\_data\_data_provider_layer.py:33, in _check_response(response, config, response_class)
30 error = RDError(error_code, error_message)
32 error.response = response
---> 33 raise error

RDError: Error code 404 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Not Found</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Not Found</h2>
<hr><p>HTTP Error 404. The requested resource is not found.</p>
</BODY></HTML>


any direction appreciated.


Best Answer

  • Jirapongse
    Answer ✓

    @thomasbanfield

    I checked and found that when using the symbol_conversion.Definition function, it uses the provided ISIN as an issue ISIN. Therefore, it returns AU3SG000137=2M.

    The following shows the search result for RIC (AU3SG000137=2M).

    response = search.Definition(
    filter="RIC eq 'AU3SG000137=2M'",
    select="BusinessEntity,DocumentTitle,ISIN,IssueISIN,RIC,IssueDate,Currency,FaceIssuedTotal,CouponRate,MaturityDate",
    top = 100
    ).get_data()

    response.data.df

    1707293917345.png

    If I used the search.Definition function to search for ISIN: AU3SG0001373, it returns AUN04000526=.

    response = search.Definition(
    filter="ISIN eq 'AU3SG0001373'",
    select="BusinessEntity,DocumentTitle,ISIN,IssueISIN,RIC,IssueDate,Currency,FaceIssuedTotal,CouponRate,MaturityDate",
    top = 100
    ).get_data()
    response.data.df

    1707294152708.png

    However, If I used the search.Definition function to search for IssueISIN: AU3SG0001373, it returns a lot of RICs.

    response = search.Definition(
        filter="IssueISIN eq 'AU3SG0001373'",
        select="BusinessEntity,DocumentTitle,ISIN,IssueISIN,RIC,IssueDate,Currency,FaceIssuedTotal,CouponRate,MaturityDate",
        top = 100
    ).get_data()
    response.data.df

Answers

  • @thomasbanfield

    Thank you for reaching out to us.

    I can run the code properly.

    config = rd.get_config()
    config.set_param("logs.transports.file.enabled", True)
    config.set_param("logs.transports.file.name", "refinitiv-data-lib.log")
    config.set_param("logs.level", "debug")
    config.set_param("http.request-timeout", 60)
    rd.open_session()

    response = symbol_conversion.Definition(
    symbols=["AU3TB0000150"],
    from_symbol_type=symbol_conversion.SymbolTypes.ISIN,
    to_symbol_types=[
    symbol_conversion.SymbolTypes.RIC,
    symbol_conversion.SymbolTypes.OA_PERM_ID
    ],
    ).get_data()

    response.data.df

    The output is:

    1707284265347.png

    You may need to enable the debug log in the library, as shown above, to verify what the problem is.

    Please share the log file (refinitiv-data-lib.log) when the problem occurred. It could be a network proxy or firewall issue.

  • Hello @thomasbanfield

    What is the Data library version that you are using? Which session (RDP or desktop) that you are using?

    I tested the Data library version 1.4.0 and 1.5.1 (latest version) and it works fine on my end for both RDP and Desktop sessions.

    Result for version 1.4.0 on CodeBook

    rd-14.png

    Result for version 1.5.1

    rd-151.png

  • HI @wasin.w and @Jirapongse , thanks for the responses. in the process of enabling the logs i have managed to get the result as you both have also. So i guess consider this case solved. Perhaps there was an issue with my session or something local.

    I am using RD version 1.5.1

    Thanks again for the help.

  • HI @wasin.w and @Jirapongse, if you do know how to answer this one, my reading suggests that you need to RIC to call pricing, to get the RIC we can convert from ISIN (the TR. function was used in excel itself)

    in the result for the symbol conversion, the RIC is inconsistent.

    When i use the search

    response = search.Definition(

    query="AU3CB0266484",

    select="ISIN,RIC,IssueDate,Currency,FaceIssuedTotal,CouponRate,MaturityDate",

    ).get_data()

    print(response.data.df.to_string())

    I receive :

             ISIN                RIC  IssueDate Currency  FaceIssuedTotal  CouponRate MaturityDate
    0 AU3CB0266484 AUN01000224= 2019-09-12 AUD 7010350000 1 2024-02-08


    but as you note above, the RIC is represented by


             DocumentTitleRICIssuerOAPermID
    AU3SG0001373New South Wales Treasury Corp, Bond Quote, NSW...AU3SG000137=2M4296044901


    Do you know why the inconsistency ?


    The end goal is to value a portfolio where the reference available is the ISIN.

    Thanks again

  • The output is:

    1707294281210.png