Pull historical trade price for the following active and expired RICs

I am using below scripts but still unable to pull historical prices for the following RICs. There are missing data from the start date but when checked in Workspace or Eikon chart apps, data is available.

Using EK get time series

import refinitiv.dataplatform.eikon as ek
import datetime
ek.set_app_key('DEFAULT_CODE_BOOK_APP_KEY')
ek.get_timeseries(['TFMBYc1','CFI2Z8^1','CFI2Z9^1','CFI2Z0^2','CFI2Z1^2','CFI2Z2^2','CFI2Z3^2','CFI2Z4^2','CFI2Z5'],
fields = ['CLOSE'],
start_date='2018-01-01',
end_date='2025-01-10',
interval='daily')

EK get Time Series.png

Using RD get history

RD get Time Series.png

Please advised. Thanks

Tagged:

Best Answer

  • jeremiemae.celajes
    Answer ✓

    Hi @Jirapongse,

    Thanks for the update.

    Client had used SETTLE however what he wants is to get historical and current day pricing which we are only able to pull using ek get time series (CLOSE field).

    Is there any workaround that would allow us to pull historical from Jan 2018 to today (Jan 14). Thanks

Answers

  • Hi @jeremiemae.celajes,

    I would suggest (i) using the new and improved LDL and (ii) the DIB. Have you looked into the DIB? If not, We created a tutorial just for this:
    https://developers.lseg.com/en/video-catalog/data-item-browser

    I found fields I think you may be after:

    image.png
  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @jermainelawrence.labajojr

    Thank you for reaching out to us.

    Regading the Eikon Data API (ek), it could be a limitation of the API, as mentioned on the Eikon Data API Usage and Limits Guideline.

    get_timeseries: The current limit value (10-Oct-2019) is 3,000 data points (rows) for interday intervals and 50,000 data points for intraday intervals. This limit applies to the whole request, whatever the number of requested instrument.

    Regarding the RD get_history, please compare the data with the Chart app and try other fields, such as SETTLE.

    df = ld.get_history(
    universe = ['CFI2Z5'],
    #fields=['TRDPRC_1'],
    start='2018-01-01',
    end='2025-01-10',
    interval='daily')
    df
    image.png
  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @jeremiemae.celajes

    Both APIs can be used to pull historical data.

    The ek.get_timeseries method has a limitation so the client needs to reduce the number of RICs in the request to make that the total data points don't exceed 3,000 data points.

    Fro the rd.get_history method, you need to check with the content team to verify which field can provide the required data.