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
7 1 3 7

how to use eikon api to get bond info via bond Shanghai code?

Bond Shanghai code : 175143

#technologyapi
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.

ISIN: CND10003TW70;

Shanghai Code: 175143

20230811120956.png

20230811120956.png (398.0 KiB)

Hello @xuke

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?


If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,


AHS


Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,
AHS

1 Answer

· Write an Answer
Upvotes
Accepted
79.3k 253 52 74

@xuke

Thank you for reaching out to us.

From my test, it doesn't work with the Shanghai Code but it works with ISIN.

You can use the Refinitiv Data Library to search for ISIN and then retrieve the data by using ISIN or RIC. The examples are available on GitHub. You can use the desktop.workspace session by setting the application key (app-key) in the refinitiv-data.config.json and setting the default session to "desktop.workspace".

1. Search for ISIN or RIC from the Shanghai Code

df = rd.discovery.search(
    view = rd.discovery.Views.FIXED_INCOME_INSTRUMENTS,
    top = 10,
    filter = "(LocalCode eq '175143')",
    select = "BusinessEntity,DocumentTitle, RIC, ISIN,LocalCode"
)
df

1691742896753.png

2. Use ISIN or RIC to get the data

rd.get_data(df["RIC"][0],["TR.RIC","TR.FIIssuerName","TR.FIMaturityDate","TR.FICouponType"])

1691742944691.png

You can use the Data Item Browser tool to search for other fields.


1691742896753.png (27.1 KiB)
1691742944691.png (16.4 KiB)
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.

@Jirapongse Thanks for your answer. One more question, how to search multiply localcodes at the same time? For example, local code 175143 and SHZ:133275

Hi @anchu ,

Not sure if you've seen it yet, Jirapongse added the answer below in this thread

My colleague @marcin.bunkowski01 found out that we can use these codes directly with the get_data method to get bond information. For example:

                    
  1. rd.get_data(['133275','175143'],['TR.FIIssuerName','TR.FIMaturityDate','TR.FICouponType','TR.FICouponTypeDescription'])

The output is:

1692068449951.png

You can use the Data Item Browser tool to search for availble fields.

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.