Retrieving annual reports using Eikon API

I would like to download the annual reports for a list of U.S. companies using an Eikon API. I read through this article which seems to describe the general process:

https://developers.refinitiv.com/en/article-catalog/article/introduction-to-filings---python

The article only refers to SEC filings. Is it also possible to download a company's annual report instead of its SEC filing?

I am just getting started using the API and am currently stuck at the second section of the article "Define Token Handling and Obtain a Valid Token". My current code is:

import eikon as ek
import numpy as np
import pandas as pd
ek.set_app_key('EIKONAPPKEY')
USERNAME = "EIKONLOGINUSER"
PASSWORD = "PASSWORD"
CLIENT_ID = "EIKONAPPKEY"

I don't really understand the first line of the Token Handling section:

TOKEN_ENDPOINT = RDP_BASE_URL + CATEGORY_URL + RDP_AUTH_VERSION + ENDPOINT_URL

At this point I get the error that RDP_BASE_URL is not defined which of course makes perfectly sense. I read through the suggested Authorization tutorial but still struggle to understand how this works and how to solve this issue. I thought the code under section 2 of the linked article includes the steps for creating a token? I would highly appreciate some help.

Best Answer

  • nick.zincone
    nick.zincone admin
    Answer ✓

    Hi @flammers

    The Refinitiv Data Library for Python does provide a Filings interface that you can utilize instead of building out your application from scratch. As referenced within this Filings Article, you may be able to significantly simplify access via the helper classes defined.

    For example, here is a simple Jupyter Notebook example I created that utilizes the helper classes:

    ahs.png

    To access the helper classes, you can refer to the link within the article or reference the GitHub source code directly.

Answers