Upgrade from Eikon -> Workspace. Learn about programming differences.

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
0 0 0 3

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?

I have investigated at my end, but could not find a solution. Not sure if this is related to the account restrictions of the id: kellen@aflatworld.com

Any help would be greatly appreciated.

Thanks

Suresh

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@ksuresh2k

Hi,

Thank you for your participation in the forum.

Is the reply below satisfactory in resolving your query?

If yes please click the 'Accept' next to the appropriate reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

AHS

@ksuresh2k

Hello again!

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

AHS

Upvote
Accepted
18.2k 21 13 21

Hi @ksuresh2k

You must have "Eikon Desktop" installed and running on the machine.

You cannot use Eikon Data APIs with Eikon Web Access.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
18.2k 21 13 21

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.


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
0 0 0 3

Thanks @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!


error.png (272.1 KiB)
webaccess.jpg (236.4 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
0 0 0 3

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!

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
18.2k 21 13 21

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."
    }
  ]
}

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.