Skip to main content

Overview

Comprehensive financial data toolkit using Yahoo Finance API.

Basic Usage

Selective Tool Configuration

Enable only specific financial capabilities:

Available Tools

When using _enable_all_tools(), the following methods are available:
  1. get_current_stock_price(symbol: str): Get current stock price
  2. get_company_info(symbol: str): Get comprehensive company information
  3. get_analyst_recommendations(symbol: str): Get analyst recommendations
  4. get_company_news(symbol: str, num_stories: int): Get recent company news
  5. get_stock_fundamentals(symbol: str): Get key financial fundamentals
  6. get_income_statements(symbol: str): Get income statement data
  7. get_key_financial_ratios(symbol: str): Get key financial ratios
  8. get_historical_stock_prices(symbol: str, period: str, interval: str): Get historical price data
  9. get_technical_indicators(symbol: str, period: str): Get technical indicators

Parameters

Constructor Parameters:
  • stock_price (bool): Enable stock price retrieval (default: True)
  • company_info (bool): Enable company information (default: False)
  • analyst_recommendations (bool): Enable analyst recommendations (default: False)
  • company_news (bool): Enable company news (default: False)
  • enable_all (bool): Enable all available tools (default: False)
Historical Data Parameters:
  • period (str): Time period - ‘1d’, ‘5d’, ‘1mo’, ‘3mo’, ‘6mo’, ‘1y’, ‘2y’, ‘5y’, ‘10y’, ‘ytd’, ‘max’
  • interval (str): Data interval - ‘1m’, ‘2m’, ‘5m’, ‘15m’, ‘30m’, ‘60m’, ‘90m’, ‘1h’, ‘1d’, ‘5d’, ‘1wk’, ‘1mo’, ‘3mo’

Complete Example

Installation