question

Upvotes
Accepted
1 0 0 1

How do I retrieve Government Debt Auctions data

I would like to retrieve the data in the following format via the rdp python api. please advise.capture.jpg

rdp-apirefinitiv-data-platformbonds
capture.jpg (147.7 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvotes
Accepted
39.2k 75 11 27

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.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Is there a way to pull historical auction data?

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')
Click below to post an Idea Post Idea