Here is the answer I got from customer support. I tried to pull the value using the same data item code in python3 but I get none for all of them. How should I get the data in python3 using eikon data api? One example ric is US240421348=.
Hi @vuk.magdelinic,
Not all historical data from RHistory is available through Python API. You can take a look at Data Item Browser in Eikon and see which fields support history and other supported parameters.
For this instrument, I can see that only daily yields are available through Python. Try something along these lines -
>>> df, err = ek.get_data('US240421348=', ['TR.BIDYIELD', 'TR.MIDYIELD', 'TR.ASKYIELD', 'TR.BIDYIELD.date'], {'SDate':'0', 'EDate':'-20', 'Frq': 'D', 'Points': 20})>>> df Instrument Bid Yield Mid Yield Ask Yield Date0 US240421348= 1.045 1.03 1.02 2022-02-11T00:00:00Z1 US240421348= 1.031 1.02 1.006 2022-02-10T00:00:00Z2 US240421348= 0.96 0.95 0.935 2022-02-09T00:00:00Z3 US240421348= 1.023 1.01 0.998 2022-02-08T00:00:00Z4 US240421348= 1.01 1.0 0.985 2022-02-07T00:00:00Z5 US240421348= 0.94 0.93 0.915 2022-02-04T00:00:00Z6 US240421348= 0.797 0.78 0.772 2022-02-03T00:00:00Z7 US240421348= 0.681 0.67 0.656 2022-02-02T00:00:00Z8 US240421348= 0.688 0.68 0.664 2022-02-01T00:00:00Z9 US240421348= 0.658 0.64 0.633 2022-01-31T00:00:00Z10 US240421348= 0.597 0.58 0.572 2022-01-28T00:00:00Z11 US240421348= 0.566 0.55 0.541 2022-01-27T00:00:00Z12 US240421348= 0.553 0.54 0.529 2022-01-26T00:00:00Z13 US240421348= 0.538 0.53 0.513 2022-01-25T00:00:00Z14 US240421348= 0.518 0.51 0.493 2022-01-24T00:00:00Z
Please see data item browser (DIB) in Eikon about various parameters.
@vuk.magdelinic
You can use the Refinitiv Data Platform Python library with the desktop session.
import refinitiv.dataplatform as rdprdp.open_desktop_session(APP_KEY)
Then, use the get_historical_price_summaries method to get daily historical data.
rdp.get_historical_price_summaries( universe = 'US240421348=', interval = rdp.Intervals.DAILY, # Supported intervals: DAILY, WEEKLY, MONTHLY, QUARTERLY, YEARLY. count = 20, fields = ['B_YLD_1','A_YLD_1','MID_YLD_1','BID','ASK','MID_PRICE'])
The output is: