Eikon Data API (Python) is throwing requests.exceptions.MissingSchema error
Hi there,
I registered an App key with Thomson Reuters using the user id: kellen@aflatworld.com
Installed python module (eikon) for integration
When I run the test using the python script below:
import eikon as ek
ek.set_app_key('XXXXXXXXXXXb3b423d6401')
df = ek.get_timeseries(["MSFT.O"], start_date="2016-01-01", end_date="2016-01-10")
I am getting an error in the last line of the code. The error is as below:
Traceback (most recent call last):
File "c:\dev\python\reuters\test.py", line 10, in <module> df = ek.get_timeseries(["MSFT.O"], start_date="2016-01-01", end_date="2016-01-10")
File "C:\Python27\lib\site-packages\eikon\time_series.py", line 163, in get_timeseries ts_result = eikon.json_requests.send_json_request(TimeSeries_UDF_endpoint, payload, debug=debug)
File "C:\Python27\lib\site-packages\eikon\json_requests.py", line 85, in send_json_request timeout=60)
File "C:\Python27\lib\site-packages\requests\sessions.py", line 555, in post return self.request('POST', url, data=data, json=json, **kwargs)
File "C:\Python27\lib\site-packages\requests\sessions.py", line 494, in request prep = self.prepare_request(req)
File "C:\Python27\lib\site-packages\requests\sessions.py", line 437, in prepare_request hooks=merge_hooks(request.hooks, self.hooks),
File "C:\Python27\lib\site-packages\requests\models.py", line 305, in prepare self.prepare_url(url, params)
File "C:\Python27\lib\site-packages\requests\models.py", line 379, in prepare_url raise MissingSchema(error)
requests.exceptions.MissingSchema: Invalid URL 'None': No schema supplied. Perhaps you meant http://None?
Best Answer
-
Hi @ksuresh2k
You must have "Eikon Desktop" installed and running on the machine.
You cannot use Eikon Data APIs with Eikon Web Access.
1
Answers
-
Hi @ksuresh2k
"I just tested your app id and it works fine on my Eikon account.
From this error:
File "C:\Python27\lib\site-packages\eikon\json_requests.py", line 85, in send_json_request timeout=60)
Do you have any firewall to block the connection ?
I used Fiddler4 to check the connection from my Eikon Desktop to service endpoint.
And verify that it is successful.
0 -
chavalit.jintamalit. It is still not working for me.
I followed the below steps while running the python api.
1. Logged into Web access of Eikon app in https://www.thomsonreuters.com/en/login.html using the user id: kellen@aflatworld.com
Please see the screen shot below.
2. Ran my test program as per below screen shot and I am getting the error.
Not sure what I am doing wrong.
I double checked to make sure there is no firewall blocking either. Telnet to port 443 to the api endpoint as per your fiddler end point works fine for me. When I run fiddler and test my python code, I cannot see any traffic going in/out.
Is this something to do with my Eikon account?
Also, you mentioned that you used your Eikon account/desktop. Should I have to run any application before accessing this api?
Thanks so much in advance!
0 -
Thanks @chavalit.jintamalit for pointing out the issue.
I have 2 requirements and I am not sure which API is the best suited for that purpose.
1. The program should run on the server to call Eikon Apis to fetch data about companies.
2. Need to fetch ESG (environmental, social and governance) data for different companies.
Could you please advise the right API that I could use to do the above?
Thanks very much!
0 -
Hi @ksuresh2k
1. Eikon is an information service that is licensed for individual use, and Eikon users may not run any instances of Eikon on a server.
2. I think you can use Elektron Data Platform(EDP) to retrieve ESG data.
Please see more information on this page.
Here is some sample output from EDP.
And the response is in JSON format (I removed some information and replaced them with xxx).
{
"links": {
"count": 1
},
"variability": "variable",
"universe": [
{
"Instrument": "IBM.N",
"Company Common Name": "International Business Machines Corp",
"Organization PermID": "4295904307",
"Reporting Currency": "USD"
}
],
"data": [
[
"IBM.N",
"20xx-xx-xx",
xxx,
"20xx-xx-xxT00:00:00",
xxxxxxx,
xx.x,
xx.xxx
]
],
"messages": {
"codes": [
[
-1,
-1,
-1,
-1,
-1,
-1,
-1
]
],
"descriptions": [
{
"code": -1,
"description": "ok"
}
]
},
"headers": [
{
"name": "instrument",
"title": "Instrument",
"type": "string",
"description": "The requested Instrument as defined by the user."
},
{
"name": "periodenddate",
"title": "Period End Date",
"type": "date",
"description": "The last day of the financial period in question."
},
{
"name": "TR.CSRReportingScope",
"title": "ESG Reporting Scope",
"type": "number",
"decimalChar": ".",
"description": "The percentage of the company’s activities covered in its Environmental and Social reporting."
},
{
"name": "TR.ESGPeriodLastUpdateDate",
"title": "ESG Period Last Update Date",
"type": "datetime",
"description": "The last update date for one or more ESG metrics for the period."
},
{
"name": "TR.CO2EmissionTotal",
"title": "CO2 Equivalents Emission Total",
"type": "number",
"decimalChar": ".",
"description": "Total CO2 and CO2 equivalent emission in tonnes. The value is the sum of Scope 1 and 2 emissions and excludes Scope 3 emissions."
},
{
"name": "TR.WomenManagers",
"title": "Women Managers",
"type": "number",
"decimalChar": ".",
"description": "Percentage of women managers."
},
{
"name": "TR.AvgTrainingHours",
"title": "Average Training Hours",
"type": "number",
"decimalChar": ".",
"description": "Average hours of training per year per employee."
}
]
}2
Categories
- All Categories
- 6 AHS
- 39 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
- 370 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
- 60 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛