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.
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')