fmp_py.fmp_financial_statements

Classes

FmpFinancialStatements

Module Contents

class fmp_py.fmp_financial_statements.FmpFinancialStatements(api_key: str = os.getenv('FMP_API_KEY'))

Bases: fmp_py.fmp_base.FmpBase

cashflow_statements_as_reported(symbol: str, period: str = 'annual', limit: int = 20) pandas.DataFrame

Retrieves the cash flow statements for a given symbol as reported by the company.

Parameters:
  • symbol (str) – The symbol of the company.

  • period (str, optional) – The period of the financial statements. Defaults to “annual”.

  • limit (int, optional) – The maximum number of statements to retrieve. Defaults to 20.

Returns:

A DataFrame containing the cash flow statements.

Return type:

pd.DataFrame

Raises:
  • ValueError – If an invalid period is provided.

  • ValueError – If no data is found for the provided symbol.

balance_sheet_statements_as_reported(symbol: str, period: str = 'annual', limit: int = 20) pandas.DataFrame

Retrieves the balance sheet statements as reported for a given symbol.

Parameters:
  • symbol (str) – The symbol of the company.

  • period (str, optional) – The period of the statements. Allowed values are “annual” and “quarter”. Defaults to “annual”.

  • limit (int, optional) – The maximum number of statements to retrieve. Defaults to 20.

Returns:

A DataFrame containing the balance sheet statements.

Return type:

pd.DataFrame

Raises:
  • ValueError – If an invalid period is provided.

  • ValueError – If no data is found for the provided symbol.

income_statements_as_reported(symbol: str, period: str = 'annual', limit: int = 20) pandas.DataFrame

Retrieves the income statements for a given symbol as reported by the company.

Parameters:
  • symbol (str) – The symbol of the company.

  • period (str, optional) – The period of the income statements. Allowed values are “annual” and “quarter”. Defaults to “annual”.

  • limit (int, optional) – The maximum number of income statements to retrieve. Defaults to 20.

Returns:

A DataFrame containing the income statements data.

Return type:

pd.DataFrame

Raises:
  • ValueError – If an invalid period is provided.

  • ValueError – If no data is found for the provided symbol.

cashflow_statements(symbol: str, period: str = 'annual', limit: int = 20) pandas.DataFrame

Retrieves the cash flow statements for a given symbol.

Parameters:
  • symbol (str) – The stock symbol.

  • period (str, optional) – The period of the statements. Allowed values are “annual” and “quarter”. Defaults to “annual”.

  • limit (int, optional) – The maximum number of statements to retrieve. Defaults to 20.

Returns:

A DataFrame containing the cash flow statements.

Return type:

pd.DataFrame

Raises:
  • ValueError – If an invalid period is provided.

  • ValueError – If no data is found for the specified parameters.

balance_sheet_statements(symbol: str, period: str = 'annual', limit: int = 20) pandas.DataFrame

Retrieves the balance sheet statements for a given symbol.

Parameters:
  • symbol (str) – The stock symbol.

  • period (str, optional) – The period of the statements. Defaults to “annual”.

  • limit (int, optional) – The maximum number of statements to retrieve. Defaults to 20.

Returns:

A DataFrame containing the balance sheet statements.

Return type:

pd.DataFrame

Raises:

ValueError – If no data is found for the provided symbol.

income_statements(symbol: str, period: str = 'annual', limit: int = 20) pandas.DataFrame

Retrieves the income statements for a given symbol.

Parameters:
  • symbol (str) – The stock symbol.

  • period (str, optional) – The period of the income statements. Defaults to “annual”.

  • limit (int, optional) – The maximum number of income statements to retrieve. Defaults to 20.

Returns:

A DataFrame containing the income statements data.

Return type:

pd.DataFrame

Raises:
  • ValueError – If an invalid period is provided.

  • ValueError – If no data is found for the specified parameters.