For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 1 2 3

Error downloading bonds because the list is too large for some countries

I am downloading bonds by country, the list of bonds from the US, CN and KR are too long for downloading, so I received different errors (Gateway Time-out, ) every time I try these countries. I was wondering which code kind I use to download these bonds by part if it is not possible to do it in bulk.

This is the code I am using:

#code for the fields

screen1 = 'SCREEN(U(IN(DEALS)/*UNV:DEALSBOND*/),TR.NIisECM=False, IN(TR.NINationHQ(NiDealPartRole=ISUP),'

screen2 = '), CURN=USD)'


#code for the fields

fields_firms = ['TR.NISdcPackageNumber',

'TR.NISdcPackageNumber.DealPackageID',

'TR.NISdcPackageNumber.DealId',

'TR.NISdcPackageNumber.IsTranchePrimary',

'TR.NISdcPackageNumber.SdcDealNumber',

'TR.NISDCTrancheId',

'TR.NIIssueDate',

'TR.NIRedemptionMaturityDate'

]


#code for parameters

parameters_screener = {'curn':'USD', 'NULL':'BLANK'}

ctry_code_list = ['US', 'CN' , 'KR']


# Retrieve firm list and info

firms_ric_list = {}

for ctry in ctry_code_list:

screen = screen1+ctry+screen2

df, err = ek.get_data(screen, fields_firms, parameters_screener)


with pd.ExcelWriter(os.path.join(d_bonds_dir,'screener_bonds_by_phyton.xlsx'), engine='openpyxl',mode='a') as writer:

df.to_excel(writer,sheet_name=ctry)

print(ctry)


eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonbondsbulk-download
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

@RHERESI

The number of bond issue deals that satisfy your criteria for the US (where the issuer ultimate parent is headquartered in the US) is over 500K. It's no surprise that you experience time outs or other errors. If this is the amount of data you intend to consume, Eikon is not the best product for you, and I would recommend you consider one of Refinitiv Enterprise products that is designed for data consumption on an industrial scale. I should also mention that any data retrieved from Eikon is licensed for individual user's use only.

This said, you could add issue date ranges to reduce the size of the result set. E.g. if you add BETWEEN(TR.NIIssueDate,20210101,20210630), which restricts the issue date to the first half of 2021, the results set is reduced to ~8K deals.

If you don't need the data for each individual deal, and you're only interested in certain aggregated information, then another possibility may be to use Navigators in RDP Search service, which provide the capaability to summarize the distribution of the search results. For more info see the article titled Building Search into your Application Workflow

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.

Click below to post an Idea Post Idea