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 Shenzhen code?


Shenzhen Code: 133275;

Bond info: Bond name, ISIN, Current Coupon, Coupon Type, Maturity Date and etc.

20230811120957.png



#technologypython api
20230811120957.png (208.3 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.

Upvotes
Accepted
80k 257 52 75

@xuke

Thank you for reaching out to us.

For this code, you can also use Refinitiv Data Library to search for RIC of this code.

df = rd.discovery.search(
    view = rd.discovery.Views.FIXED_INCOME_INSTRUMENTS,
    top = 10,
    filter = "LocalCodesLocalScheme  eq 'SHZ:133275'",
    select = "BusinessEntity,DocumentTitle, RIC, ISIN, MaturityDate,CouponType"
)
df

1691745752230.png

You can use the following code to get the list of fields in the FIXED_INCOME_INSTRUMENTS view.

from refinitiv.data.content import search
response = search.metadata.Definition(
    view = search.Views.FIXED_INCOME_INSTRUMENTS  
).get_data()


response.data.df

1691745838168.png


1691745752230.png (30.1 KiB)
1691745838168.png (44.1 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 reply.

I found that the filter "filter = "LocalCodesLocalScheme eq 'SHZ:133275'"" is different from "filter = "(LocalCode eq '175143')"". Is there a common filter to search for and is suitable for all different regions in the world?

Upvote
80k 257 52 75

@xuke

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

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.


1692068449951.png (25.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 we tried the bond code="123205", and we cannot use rd.get_data method to get the RIC code. it returns empty. Please help to find the reason, thank you.

Please try the TR.PreferredRIC field.

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

1692085233160.png

1692085233160.png (36.8 KiB)

@Jirapongse Could we use this method to search for fund and stock RIC code?

e.g. fund code: China Code FE = '006038' ;

(detailed information: RIC code= 'LP68497266')

stock code:301048;

(detailed information: RIC code= '301048.SZ')

I cannot attach the pictures on the comment. So I write the ric code for your reference.

Show more comments
Upvotes
80k 257 52 75

@xuke

I tired several fields that can provide RICs.

rd.get_data(['133275','175143','123205','006038','301048'],
            ['TR.FIIssuerName','TR.FIMaturityDate','TR.FICouponType','TR.FICouponTypeDescription',
             'TR.PreferredRIC','TR.RIC','TR.LipperRICCode','TR.PrimaryIssueRICCode','TR.FundHoldingRIC'])

The output is:

1692091793696.png

You can contact the Eikon Excel support team directly via MyRefinitiv and ask for fields that can provide the required data. Typically, the fields used with the TR function in Eikon Excel can also be used with the get_data method.


1692091793696.png (62.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 sorry to bother you again. Since we don't have the license to retrieve the real time data, we cannot use the TR function.

And I find that the result of the fond asset "006038" is not the asset we want. TR.FundName should be 'Dacheng JingHeng Mixed Fund C'.

Does this mean we cannot use '006038' code to retrieve data?

In this case, you can get a RIC from search.

df = rd.discovery.search(
    view = rd.discovery.Views.FUND_QUOTES,
    top = 10,
    filter = "LocalFundCode eq '006038'",
    select = "BusinessEntity,DocumentTitle, RIC,LocalFundCode"
)
df

1692098850794.png

1692098850794.png (23.7 KiB)

@Jirapongse Thanks for your reply. How to search the multiple code by using this search function? E.g. '006038', '012728'.

Show more comments

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.