🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

Yahoo Claw

by @leohuang8688

Yahoo Finance API integration for OpenClaw. Use when users ask for stock prices, company financials, historical data, dividends, or market data. Supports rea...

Versionv0.1.7
Downloads1,082
Stars⭐ 1
TERMINAL
clawhub install yahooclaw

πŸ“– About This Skill


name: yahooclaw description: Yahoo Finance API integration for OpenClaw. Use when users ask for stock prices, company financials, historical data, dividends, or market data. Supports real-time quotes, financial statements, and market analysis.

YahooClaw - Yahoo Finance API Integration

πŸ”’ Security

  • βœ… No shell command execution
  • βœ… All API calls use HTTPS
  • βœ… Rate limiting implemented
  • βœ… Open source and auditable
  • ⚠️ API keys must be set via environment variables
  • ℹ️ Uses in-memory caching for performance (no database)
  • Overview

    YahooClaw is an OpenClaw skill that integrates Yahoo Finance API, providing real-time stock data queries, financial analysis, historical stock prices, and more.

    Permissions

    Required Permissions

  • βœ… Network Access: Yahoo Finance API (HTTPS)
  • βœ… File Access: Local SQLite database storage (optional caching)
  • ❌ No Admin/Root Privileges Required
  • ❌ No System Command Execution
  • ❌ No Access to User Privacy Data
  • Data Flow

  • Stock Data: Yahoo Finance API β†’ Local Processing β†’ Return Results
  • No user data uploaded
  • Temporary caching only (optional)
  • Use Cases

    1. Real-time Stock Quotes

    Query AAPL stock price
    How much is Tesla now
    NVDA latest stock price
    

    2. Company Information

    What is Apple's market cap
    Microsoft's P/E ratio
    Google's revenue data
    

    3. Historical Data

    Show AAPL stock price for the past 30 days
    Tesla's trend last month
    

    4. Financial Metrics

    Apple's balance sheet
    Tencent's income statement
    

    5. Dividends

    What is AAPL's dividend
    Which stocks have high dividend yields
    

    Usage Examples

    Basic Usage

    const YahooClaw = require('./src/yahoo-finance.js');

    // Get real-time stock quote const quote = await YahooClaw.getQuote('AAPL'); console.log(quote);

    // Get historical data const history = await YahooClaw.getHistory('TSLA', '1mo'); console.log(history);

    // Get company information const info = await YahooClaw.getCompanyInfo('MSFT'); console.log(info);

    OpenClaw Integration

    // Call in OpenClaw agent
    const result = await tools.yahooclaw.getQuote({symbol: 'AAPL'});
    

    API Parameters

    getQuote(symbol)

  • symbol: Stock code (e.g., AAPL, TSLA, 0700.HK)
  • Returns: Real-time stock price, change, volume, etc.
  • getHistory(symbol, period)

  • symbol: Stock code
  • period: Time period (1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max)
  • Returns: Historical stock price data
  • getCompanyInfo(symbol)

  • symbol: Stock code
  • Returns: Company information, market cap, P/E ratio, P/B ratio, etc.
  • getDividends(symbol)

  • symbol: Stock code
  • Returns: Dividend history
  • Environment Variables

    # Optional: Alpha Vantage API (backup data source)
    

    Get from: https://www.alphavantage.co/support/#api-key

    ALPHA_VANTAGE_API_KEY=your_api_key_here

    Optional: Database path for caching

    DATABASE_PATH=./yahooclaw.db

    Notes

    1. Data Delay: Yahoo Finance real-time data may have 15-minute delay 2. Rate Limiting: Control request frequency to avoid rate limits 3. HK/A-Shares: Supports HK stocks (0700.HK), A-shares (600519.SS), etc. 4. Error Handling: Network issues or invalid codes will return error messages

    Troubleshooting

    Common Issues

    1. Failed to Get Data - Check network connection - Verify stock code format - Check Yahoo Finance service status

    2. Data Delay - This is normal, Yahoo Finance real-time data has delay - Consider using paid API for truly real-time data

    3. A-Share/HK Stock Code Format - A-Shares: 600519.SS (Moutai) - HK Stocks: 0700.HK (Tencent) - US Stocks: AAPL (Apple)

    Resources

  • Yahoo Finance API Documentation
  • yfinance Python Library
  • OpenClaw Documentation
  • Changelog

    v1.0.0 (2026-03-12)

  • βœ… Security improvements
  • βœ… Removed all test/debug files
  • βœ… Fixed unicode characters
  • βœ… Updated documentation
  • βœ… Production ready
  • v0.1.0 (2026-03-09)

  • βœ… Initial release
  • βœ… Real-time stock quotes
  • βœ… Historical data queries
  • βœ… Company information queries
  • βœ… Dividend queries
  • βœ… OpenClaw integration
  • License

    MIT License

    Author

    PocketAI for Leo - OpenClaw Community

    ⚑ When to Use

    TriggerAction
    ```
    Query AAPL stock price
    How much is Tesla now
    NVDA latest stock price
    ```
    ### 2. Company Information
    ```
    What is Apple's market cap
    Microsoft's P/E ratio
    Google's revenue data
    ```
    ### 3. Historical Data
    ```
    Show AAPL stock price for the past 30 days
    Tesla's trend last month
    ```
    ### 4. Financial Metrics
    ```
    Apple's balance sheet
    Tencent's income statement
    ```
    ### 5. Dividends
    ```
    What is AAPL's dividend
    Which stocks have high dividend yields
    ```

    πŸ“‹ Tips & Best Practices

    1. Data Delay: Yahoo Finance real-time data may have 15-minute delay 2. Rate Limiting: Control request frequency to avoid rate limits 3. HK/A-Shares: Supports HK stocks (0700.HK), A-shares (600519.SS), etc. 4. Error Handling: Network issues or invalid codes will return error messages