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)
Best Answer
-
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
0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛