setting verify=false for eikon get_timeseries call in python
Hi
I'm trying to fix some ssl certificate bugs by setting verify=false when making a timeseries call for the eikon api in python. Im doing like this:
import eikon as ek
ek.set_app_key('............')
X=ek.get_timeseries(["RICS code"], ['close'], start_date="2015-01-01", end_date="2024-02-04", verify=False)
In the end of the call though, its not possible to put verify=false. It gives me the error "TypeError: get_timeseries() got an unexpected keyword argument 'verify'".
Could anyone help me how to set verify=false in the correct way for eikon get_timeseries?
thx
Best Answer
-
If you want to disable SSL validity check, then you could try the following. The example shows news, but same approach can be used with other endpoints. Please note that this is only for the purpose of debugging an app under development and should never be used extensively or in a production setup.
ek.set_app_key("--APP_KEY--")
http_session = ek.Profile.get_profile()._get_desktop_session()
# following request is the same than story = ek.get_news_story("urn:newsml:reuters.com:20240220:nDJRMLB92:1")
http_response = http_session.http_request(
url=http://127.0.0.1:9060/api/v1/data,
method="POST",
headers={
"Content-Type": "application/json",
"x-tr-applicationid": ek.get_app_key(),
},
json={
"Entity": {
"E": "News_Story",
"W": {
"attributionCode": "",
"productName": "--APP_KEY--",
"silent": True,
"storyId": "urn:newsml:reuters.com:20240220:nDJRMLB92:1",
},
}
},
verify=False,
)
json_data = http_response.json()
html_data = json_data.get("story").get("storyHtml")0
Answers
-
The get_timeseries API call does not have any parameter named verify. You are confusing it with verify=False commonly used in Python Requests module - which should not be used either due to security issues.
I would recommend that you upgrade your Python instance and the associated certificate store, so that the SSL verification check is passed.
0 -
The Eikon Data API retrieves data via the http protocol (not https) which is running on the localhost. I am not sure why you need to set verify to false.
If you get the ssl certificate issue, it could be the problem in the Eikon or Refinitiv Workspace processes.
0 -
With latest version of httpx library, this code will fail, but following code should fix:
ek.set_app_key("--APP_KEY--")
desktop_session = ek.Profile.get_profile()._get_desktop_session()
desktop_session._http_session = httpx.AsyncClient(
headers={"Accept": "application/json"}, timeout=60, verify=False
)
X = ek.get_timeseries(["RICS code"], ['close'], start_date="2015-01-01", end_date="2024-02-04")1 -
Thx for your answers. We got problem solved by changing user settings on my eikon setup. So Jirapongse was right about problem coming from Eikon Workspace process.
Rasmus
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 中文论坛