Get the FREE Ultimate OpenClaw Setup Guide →

alphaear-stock

Scanned
npx machina-cli add skill RKiding/Awesome-finance-skills/alphaear-stock --openclaw
Files (1)
SKILL.md
852 B

AlphaEar Stock Skill

Overview

Search A-Share/HK/US stock tickers and retrieve historical price data (OHLCV).

Capabilities

1. Stock Search & Data

Use scripts/stock_tools.py via StockTools.

  • Search: search_ticker(query)
    • Fuzzy search by code or name (e.g., "Moutai", "600519").
    • Returns: List of {code, name}.
  • Get Price: get_stock_price(ticker, start_date, end_date)
    • Returns DataFrame with OHLCV data.
    • Dates format: "YYYY-MM-DD".

Dependencies

  • pandas, requests, akshare, yfinance
  • scripts/database_manager.py (stock tables)

Source

git clone https://github.com/RKiding/Awesome-finance-skills/blob/main/skills/alphaear-stock/SKILL.mdView on GitHub

Overview

AlphaEar Stock Skill lets you search A-share, HK, and US stock tickers and retrieve historical OHLCV price data. It helps you quickly identify tickers by code or name and fetch price history for analysis or decision making. This capability is essential for tracking price movements and accessing company-specific stock information.

How This Skill Works

It leverages StockTools via stock_tools.py to perform a fuzzy ticker search with search_ticker(query), returning a list of {code, name}. For historical data, get_stock_price(ticker, start_date, end_date) returns an OHLCV DataFrame with dates formatted as YYYY-MM-DD. Dependencies include pandas, requests, akshare, yfinance, and the internal scripts/database_manager.py for stock tables.

When to Use It

  • You need the ticker for a company by name or partial code.
  • You want historical OHLCV data for a specific ticker.
  • You want price data for a ticker within a specific date range.
  • You want to perform a fuzzy search by code or company name.
  • You’re compiling a list of stock tickers and need matches from A-share, HK, or US markets.

Quick Start

  1. Step 1: Use StockTools via search_ticker(query) to find tickers.
  2. Step 2: Pick a ticker from the results.
  3. Step 3: Call get_stock_price(ticker, start_date, end_date) to fetch OHLCV data.

Best Practices

  • Provide clear query terms for search_ticker to improve fuzzy results.
  • Specify start_date and end_date in YYYY-MM-DD when calling get_stock_price.
  • Verify the returned tickers before fetching price data.
  • Ensure required dependencies (pandas, requests, akshare, yfinance) are installed.
  • Use scripts/database_manager.py to store or manage stock tables if needed.

Example Use Cases

  • search_ticker('Moutai')
  • get_stock_price('600519', '2024-01-01', '2024-12-31')
  • search_ticker('AAPL')
  • get_stock_price('0700.HK', '2023-08-01', '2023-08-31')
  • get_stock_price('AAPL', '2022-01-01', '2022-12-31')

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers