Hi! I have a list of RICs around 700 firms. I am trying to find ISIN of their issued bond for a typical year (for example 2020). How can I use API for this issue? Many thanks!
Hi @jiayin.meng.20
As @aramyan.h has pointed out, the one API that could provide such information is the Search API. With this, you can experiment the results based on any desired query.
For example, here is a simple experimental query for Microsoft:
The above does provide some general details that could be relevant to determine the issued bonds for Microsoft. However, I did not find the actual RIC associated with each of these hits. The best I could do was capture the Ticker - which may be sufficient.
Now, to actually capture the list of ISINs issued within a given year, you can to something like this:
Here are the top 10 hits for 2017. Now, with Search, if you want to be more specific, you could apply additional filters based on your requirements. But I think this could be a good start for your investigation.
Hi @jiayin.meng.20 ,
I have posted an answer to a similar question here proposing Search capabilities of Refinitiv Data Libraries for Python.
Please check it here: How can I use python to get issued bonds of an issuer for a given issuer's Ticker? - Forum | Refinitiv Developer Community
Best regards,
Haykaz
You can try adding the "FirstAnnouncementDate":
Also, you can apply the date filter against this field if that is more applicable.
Hi @nick.zincone , may I ask how can I export this result into excel? I try to write code as follows, but it fails.
import pandas as pdimport refinitiv.data as rdrd.open_session()result = rd.discovery.search( view = rd.discovery.Views.GOV_CORP_INSTRUMENTS,filter = "(DbType eq 'CORP' and RCSAssetCategory eq 'A:J' and DebtType ne 'SYKHYB' and DebtType ne 'SUK*' and IsConvertible eq false and ((IssuerOrgid eq '27965') and IsGreenBond eq false and (IssueDate ge 2013-01-01 and IssueDate le 2013-12-31)))",select = "FirstAnnouncementDate,CouponRate,MaturityDate,IssueDate,ISIN,FaceIssuedUSD,RCSConvertibleLeaf,IsGreenBond,IssuerOrgid")if result.data: data_df = pd.DataFrame(result.data) excel_path = 'E:\\RIC-2013_conventional.xlsx' data_df.to_excel(excel_path, index=False) print(f"Data successfully written to {excel_path}")else: print("No data retrieved."rd.close_session()
The call to export you have is generally correct. However, I have no idea what fails or if the drive you specified 'E:' exists. I would simply just specify the filename to ensure you can export.
data_df.to_excel("test.xlsx")
This site is not responsible for pandas dataframe issues so if the above fails, then I would recommend contacting the Python community or the Pandas discussion boards.