How can I fetch volume data for local corporate bonds?

I created an Eikon API app key through the desktop app in order to access it via Python. The connection and access worked good so far. I'm having trouble retrieving financial data on some specific local market corporate bonds (RICs and example provided attached). Asked the author of some Eikon API tutorial and told me the instrument is classified as "high level" which meant not all fields are available. I'm specifically interested in retrieving historical VOLUME data via the .get_data() function. But...

I've been retrieving this data from the Eikon Excel Add-on without trouble for some time now... and the data is availale and works great.

I need some guidance on how to proceed and get the function to fetch the volume data I'm working with.


RIC: ARYMCIO3=BA

image of what im getting

image0-1.jpg

Thank you in advance.

Best Answer

  • wasin.w
    wasin.w admin
    Answer ✓

    Hello @jsalvatierra

    The ek.get_timeseries method returns the time series data such as Open, High, Low, Close, etc. You need to request those issuing dates/companies' data from the ek.get_data method.

    I cannot guide you on which fields to use that match your requirement because I am not a content expert. However, there are 2 tools on Eikon/Workspace that can help you check the available fields of the RIC.

    The first tool is the "Code Creator" (CODECR). You can input the RIC, search the interested fields, then the tool generates an example code for you.

    code-creator.png

    The second tool is the "Data Item Browser" (DIB). You can input the RIC, and search the interested fields, then the tool shows if that field data is available for you.

    dib.png


    Alternatively, you can contact the content team directly to help you with the RIC and field names. You can contact them via the my.refinitiv.com website.

    Hope this helps.


Answers

  • Hello @jsalvatierra

    Can you check if the Eikon/Workspace Data Item Browser (DIB) app shows the Volume field data for the ARYMCIO3=BA RIC code?

    I have checked on my end but the volume data is not available.

    dib-1.png

    Can you share your Eikon Excel formula that can get the data?


  • Hi @wasin.w , sure, this is the way we do it in Excel.

    With this volume data I properly do the analysis I use Eikon for... so the goal was to build some python script which, with just in-putting the RIC/s, returned the .sum() of the trade volume for n days.

    1657207180896.png

  • Hi @jsalvatierra


    You may want to look into using the new RD library in Python and the following:

    IntradayTimeSeriesDf = rd.get_history(
        universe=FTSEConstituents[1:6],
        fields=['TRDPRC_1'],
        interval="1min", # The consolidation interval. Supported intervals are: tick, tas, taq, minute, 1min, 5min, 10min, 30min, 60min, hourly, 1h, daily, 1d, 1D, 7D, 7d, weekly, 1W, monthly, 1M, quarterly, 3M, 6M, yearly, 1Y.
        start="2022-05-11T13:00:00",
        end="2022-05-11T13:30:00")


    Do let us know if it is what you're after or not.

    1657208521008.png

  • What is the difference with the Eikon Api?

    I'll give it a try. I only need daily volume data for some local corporate bonds e.g. ARYMCIO3=BA , i think what i'm missing is how i call the "VOLUME" field..

  • Hello @jsalvatierra

    I noticed that your Eikon Excel formula is RHistory(...) which is for requesting historical data.

    You may need to use the Eikon Data API get_timeseries() method instead. You can check the method usage guide from the Eikon Data APIs for Python - Reference Guide page.

    df = ek.get_timeseries(['ARYMCIO3=BA'],interval = 'daily')
    df.sort_values(by = 'Date', ascending = False)

    df-get-history.png

    The Refinitiv Data (RD) Library - Python is the strategic library. Eikon Data APIs retrieve data using legacy infrastructure that will eventually be replaced by RD. However, at this time numerous datasets available through Eikon are not yet available through RD.

  • This worked amazing! Thank you very much!

    Now, how can i retrieve some more data like issuing date, issuing company, etc..?

    I'm kinda new to reikon and haven't seen any of this on the documentation/tutorials


    Thanks again! Have a nice weekend

  • Amazing! will check it out. Thank you very much