Is there any code that enables us to map/fetch the news source name based on a list of source cod...

...es extracted with get_news_headlines()?

Technology: Eikon API on Windows Visual Studio Code


I was wondering if there is any code that enables us to map/fetch the news source name based on a list of source codes extracted with get_news_headlines()?


Example:

1719211460755.pngimage

sourceCode = "NS:RTRS" => return "Reuters News"


Best Answer

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @tly-trial

    Thank you for reaching out to us.

    You need to use the Refinitiv Data Library for Python instead.

    The news examples are on GitHub. Moreover, there is an endpoint to retreive news metadata. The endpoint example is also on GitHub.

    The code looks like this:

    baseurl = "/data/news/v1/metadata/NS:RTRS"

    request_definition = rd.delivery.endpoint_request.Definition(
    url = baseurl,
    method = rd.delivery.endpoint_request.RequestMethod.GET)
    response = request_definition.get_data()
    response.data.raw

    The output is:

    1719305471210.png


Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.