Python ld.get_data() Unable to collect data for field 'TR.ASKPRICE.DATE' and some specific idenfier

I have a list of over 800 bond ISIN and I am using ld.get_data() in a loop to download historical pricing data in chunks (see attached txt file). I need a solution to handle cases where no data is available, so that no errors are returned.
First isin chunk: ['ES0200002022', 'IT0005057770', 'US00289WAA99', 'USE00020AA01', 'JP376280AG96', 'JP525003CH18', 'JP525003DH17', 'XS1242327325', 'NO0010720972', 'XS1238024035', 'AT0000A191A9', 'AT0000A1MC22', 'AT0000A1MC30', 'LV0000801777', 'XS1242327168', 'NO0010723265', 'NO0010723257', 'XS1140300663', 'INE336K07016', 'INE336K07024', 'INE336K07032', 'XS1263846617', 'NO0010790769', 'TW000B718907', 'XS1113024563']
Isin chunk example with problems: ['LT0000404238', 'ES0200002055', 'PTEDPLOM0017', 'US75975AAA88', 'XS2104995399', 'NO0010872948', 'USY7279WAA90', 'USA35155AD17', 'XS2095992017', 'NO0010874050', 'XS2082429890', 'XS2123970167', 'PLCFRPT00054', 'INE316W07013', 'XS2110675860', 'XS2127478316', 'US209111FX66', 'US209111FY40', 'US67021CAP23', 'US032654AS42', 'US05351WAC73', 'US744448CU39', 'FR0013515707', 'NO0010881337', 'USU1851TAC54']
My issue are the following error messages that appear for some ISIN when there seems to be no data avilable while for other just an empty row is returned. See errors below, after the code ran for a few rounds. I know that also the first chunks contain ISIN for which data is not available but for some reason the code can handle them there. I have implemented to remove those ISIN from the code and try again but this takes very long. Maybe someone has a better solution?
Here I tried downloading prices for one ISIN of a chunk that runs without error in the loop, but now giving errors:
How it is supposed to look:
In a previous version I used rdp.get_data() and I did not have issues with empty ISIN. So I do not understand what changed with ld.get_data() ?
Thanks!
Answers
-
Thank you for reaching out to us.
I checked and found that the library will throw an exception if all requested items have no data or are invalid.
If I add a valid item (US4592001014) to the same list, the data can return properly.
I found that the code uses the try/except to handle exceptions. This is the proper way to handle the problems in the library.
0 -
Dear @Jirapongse
thank you for the reply. I guess this means there is no other way to handle the issue as I do not know upfront if there will be data returned for the ISIN chunk or not.
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 684 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 250 ETA
- 555 WebSocket API
- 37 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 643 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 915 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛