Example code from Reuters is not working

So helpdesk has asked me to ask the community?? here ? why the quick tutorial code isnt working, i am using vs code python with jupyter notebook.

The code is just a copy from the quick start guide on the refinitiv website

import eikon as ek

import pandas as pd

ek.set_app_key('my-api tokin')

ek.get_news_headlines('EU AND POL',1)

it works fine until the last line, but simply doesnt return any code, instead after like 10 min waiting or similar it returns this:

2024-01-18 20:47:48,591 P[10672] [MainThread 28692] Error code 404 | Client Error: <!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><title>Error</title></head><body><pre>Cannot POST /api/v1/data</pre></body></html>2024-01-18 20:47:48,593 P[10672] [MainThread 28692] HTTP request failed: EikonError-Client Error: <!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><title>Error</title></head><body><pre>Cannot POST /api/v1/data</pre></body></html>

Best Answer

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @johan01

    Thank you for reaching out to us.

    The error indicates that your account doesn't support the API feature.

    Cannot POST /api/v1/data

    As I know, it depends on the Eikon variant that you are using. For example, the Eikon Core variant doesn't include Eikon Data API.

    You can check it by folllowing the steps mentioned in the Eikon Data API and Refinitiv Data Library - Troubleshooting article.

    Otherwise, you can contact your LSEG account team or Sales team to verify your account.


Answers