How to get the bond information by Eikon API

I am using Eikon API to get data of bonds.

I want to know how to get the "含息价" of bond "CN230004", refer to the attachment.

Which "数据项代码" I shoud use?

// Eikon Python API

import eikon as ek

ek.set_app_key('-------------key----------------')

data= ek.get_data( ['CN230004'],[数据项代码???])


20230517113334.png

Best Answer

  • m.bunkowski
    Answer ✓

    Hi @chujingnian

    Try this:

    import refinitiv.data as rd
    from refinitiv.data.content.ipa.financial_contracts import bond
    rd.open_session()
    response = bond.Definition(
    instrument_code="CND100063XD1",
    fields=['DirtyPrice'],
    pricing_parameters = bond.PricingParameters(
    market_data_date="2023-05-17")).get_data()
    response.data.df

Answers

  • Hi @chujingnian ,

    The moderators on this forum do not have deep expertise in
    every type of content available through Refinitiv products. Such expertise is
    available through Refinitiv Helpdesk. If the Helpdesk can show you how to
    retrieve it using =@TR formula in Eikon Excel, then
    the moderators on this forum can help you translate it into get_data method in the Eikon Data API call. Refinitiv Helpdesk can
    be reached via MyRefinitiv.

    To be of help, I have opened a
    support case on your behalf, case 12571405, please expect an Eikon support
    expert to reach out to you shortly, via the email address you registered on the
    developers portal.