FinancialDatasetsAPIWrapper#

class langchain_community.utilities.financial_datasets.FinancialDatasetsAPIWrapper[source]#

Bases: BaseModel

Wrapper for financial datasets API.

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

param financial_datasets_api_key: str | None = None#
get_balance_sheets(ticker: str, period: str, limit: int | None) List[dict][source]#

Get the balance sheets for a stock ticker over a period of time.

Parameters:
  • ticker (str) – the stock ticker

  • period (str) – the period of time to get the balance sheets for. Possible values are: annual, quarterly, ttm.

  • limit (int | None) – the number of results to return, default is 10

Returns:

a list of balance sheets

Return type:

List[dict]

get_cash_flow_statements(ticker: str, period: str, limit: int | None) List[dict][source]#

Get the cash flow statements for a stock ticker over a period of time.

Parameters:
  • ticker (str) – the stock ticker

  • period (str) – the period of time to get the balance sheets for. Possible values are: annual, quarterly, ttm.

  • limit (int | None) – the number of results to return, default is 10

Returns:

a list of cash flow statements

Return type:

List[dict]

get_income_statements(ticker: str, period: str, limit: int | None) dict | None[source]#

Get the income statements for a stock ticker over a period of time.

Parameters:
  • ticker (str) – the stock ticker

  • period (str) – the period of time to get the balance sheets for. Possible values are: annual, quarterly, ttm.

  • limit (int | None) – the number of results to return, default is 10

Returns:

a list of income statements

Return type:

dict | None

run(mode: str, ticker: str, **kwargs: Any) str[source]#
Parameters:
  • mode (str) –

  • ticker (str) –

  • kwargs (Any) –

Return type:

str

Examples using FinancialDatasetsAPIWrapper