Error on pulling bond data using API

This is the following simple line of code that I am trying to execute:
rdp.open_desktop_session(config["api_key"])
ek.set_app_key(config["api_key"])
session = rd.session.desktop.Definition(app_key=config["api_key"]).get_session()
session.open()
rd.session.set_default(session)
fields = [
"TR.ISIN",
"TR.FiAssetTypeDescription",
"TR.FiMoodysRating",
"TR.FiFitchsRating",
"TR.IssuerRating",
"TR.FiIssuerMoodysRating",
"TR.FiSeniorityTypeDescription",
"TR.FiMaturityDate",
]
bond_df = ek.get_data(["IT173395892="], fields)[0]
bond_df
And this is the error message I am receiving:
EikonError Traceback (most recent call last)
File c:\Users\jrodriguez159\AppData\Local\Programs\Python\Python311\Lib\site-packages\eikon\json_requests.py:127, in send_json_request(entity, payload, debug)
126 else:
--> 127 _raise_for_status(response)
128 except httpx.TimeoutException as timeout_exception:
File c:\Users\jrodriguez159\AppData\Local\Programs\Python\Python311\Lib\site-packages\eikon\json_requests.py:271, in _raise_for_status(response)
270 logger.error(u'Error code {} | {}'.format(response.status_code, error_msg))
--> 271 raise EikonError(response.status_code, error_msg)
EikonError: Error code 429 | Client Error: Too many requests, please try again later.
During handling of the above exception, another exception occurred:
EikonError Traceback (most recent call last)
Cell In[3], line 21
8 rd.session.set_default(session)
10 fields = [
11 "TR.ISIN",
12 "TR.FiAssetTypeDescription",
(...)
18 "TR.FiMaturityDate",
19 ]
---> 21 bond_df = ek.get_data(["IT173395892="], fields)[0]
23 bond_df
File c:\Users\jrodriguez159\AppData\Local\Programs\Python\Python311\Lib\site-packages\eikon\data_grid.py:190, in get_data(instruments, fields, parameters, field_name, raw_output, debug)
187 if _endpoint == DataGridAsync_UDF_endpoint:
188 payload = {'requests': [payload]}
--> 190 result = eikon.json_requests.send_json_request(_endpoint, payload, debug=debug)
192 if result.get('responses'):
193 result = result['responses'][0]
File c:\Users\jrodriguez159\AppData\Local\Programs\Python\Python311\Lib\site-packages\eikon\json_requests.py:134, in send_json_request(entity, payload, debug)
132 except EikonError as eikon_err:
133 logger.error(f"HTTP request failed: {type(eikon_err).__name__}-{eikon_err.message}")
--> 134 raise EikonError(eikon_err.code, eikon_err.message)
135 except httpx.ConnectTimeout as connect_timeout:
136 logger.debug(f'HTTP ConnectTimeout: {connect_timeout}')
EikonError: Error code 429 | Client Error: Too many requests, please try again later.
***Advised about Error code 429 but client said this was working earlier today. Thank you all.
Answers
-
Thank you for reaching out to us.
I checked the code and found the client opens sessions for the RDP library, RD library, and Eikon Data API library.
rdp.open_desktop_session(config["api_key"]) // RDP Libraray
ek.set_app_key(config["api_key"]) //Eikon Data API LIbrary
session = rd.session.desktop.Definition(app_key=config["api_key"]).get_session() //RD Libraray
session.open()
rd.session.set_default(session)I am not sure why the client needs to initialize all three libraries.
Regarding the 429 error, it indicates that the usage reaches its limits, as mentions on the Eikon Data API Usage and Limits Guideline document. Please check the document.
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
- 685 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
- 252 ETA
- 556 WebSocket API
- 38 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
- 652 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
- 917 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 中文论坛