I would like to retrieve the data in the following format via the rdp python api. please advise.
I would like to retrieve the data in the following format via the rdp python api. please advise.
Hi,
Thank you for your participation in the forum.
Is the reply below satisfactory in answering your question?
If yes please click the 'Accept' text next to the reply. This will guide all community members who have a similar question.
Otherwise please post again offering further insight into your question.
Thanks,
AHS
Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.
Thanks,
AHS
For the US you can get the results of the latest auction for each of the benchmarks from the chain 0#USINVEST=RR. E.g. the following code prints it for 5Y and 10Y notes.
fld_dic = {'OFFCL_CODE':'CUSIP','VALUE_DT1':'Auction date', 'GN_TX20_2':'Price','GEN_TEXT16':'Auction size'} def print_data(streaming_prices): df = streaming_prices.get_snapshot() df.rename(columns=fld_dic, inplace=True) print(df) streaming_prices.close() streaming_prices = rdp.StreamingPrices( universe = ['US5YINV=RR','US10YINV=RR'], fields = list(fld_dic.keys()), on_complete = print_data ) streaming_prices.open()
The first line in the above code snippet constructs the dictionary of fields mapping cryptic field names used for this data on the real-time data feed to friendly display names. To understand the data model and to figure out what fields names you need to use and what those fields represent you'd need to use the Quote app in Eikon or Refinitiv Workspace.
Yes, you can get historical auctions data for a given benchmark using the same RICs with get_historical_price_summaries method of RDP Library, e.g.
rdp.get_historical_price_summaries('US5YINV=RR')