How to get historical closing price for ric *=RRPS through Eikon API with python?

I am trying to get the historical closing price for *=RRPS (e.g. AT0000A1K9C8=RRPS, BE352=RRPS)


df_r,e = ek.get_data(' BE291=RRPS' ,['TR.PriceClose'],

{'SDate':'2022-01-01','EDate':'2022-06-30','Frq':'D'})

CF_CLOSE doesn't work for historical prices

screenshot-2022-07-12-162814.jpg

I tried ek.get_timeseries but it returned the close yield.

df = ek.get_timeseries([ 'BE352=RRPS' ] ,fields="CLOSE" , start_date = '2022-01-01', end_date = '2022-06-30')


2.jpg


Welcome!

It looks like you're new here. Sign in or register to get started.

Best Answer

  • [Deleted User]
    [Deleted User] Newcomer
    Answer ✓

    Hi @rinnie.cheung ,


    Please use the DIB to find the field that you are after. You can use the cog (top right) to filter for series datapoints for which you can look for historical data:


    1657705367252.png



    import refinitiv.data as rd
    rd.open_session()
    df3 = rd.get_history(
    universe=["BE291=RRPS"],
    fields=["TR.MIDPRICE", "TR.MIDYIELD"],
    interval="1D",
    start="2021-10-01",
    end="2022-06-01",
    )
    display(df3)
    rd.close_session()

    1657705540705.png


    Daily data using the rd.get_history function returns end-of-day datapoints, be it Bid, Ask or Mid, apart from if mentioned otherwise in the DIB.

Answers

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.