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")0 -
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
- 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 中文论坛