PluginBench
Skill
Pass
Audit score 90

alphaear-stock

rkiding/awesome-finance-skills

Search and analyze A-Share, HK, and US stock tickers with historical price data.

What is alphaear-stock?

Retrieve stock ticker information and OHLCV historical price data for Chinese A-Share, Hong Kong, and US markets. Use this when users ask about stock codes, price history, company fundamentals, or recent market changes.

  • Search stocks by code or company name with fuzzy matching across A-Share, HK, and US markets
  • Retrieve OHLCV (Open, High, Low, Close, Volume) historical price data for any date range
  • Get fundamental company data including sector, industry, market cap, and PE ratio
  • Support for multiple market exchanges and automatic proxy handling for international data access

How to install alphaear-stock

npx skills add https://github.com/rkiding/awesome-finance-skills --skill alphaear-stock
Prerequisites
  • Python packages: pandas, requests, akshare, yfinance
  • For US stock data: may require HTTP/HTTPS proxy configuration if network cannot reach Yahoo Finance directly
Claude Code
Cursor
Windsurf
Cline

How to use alphaear-stock

  1. 1.Call search_ticker(query) with a company name or stock code to find matching tickers
  2. 2.Use get_stock_price(ticker, start_date, end_date) with dates in YYYY-MM-DD format to retrieve historical OHLCV data
  3. 3.Call get_stock_fundamentals(ticker) to retrieve sector, industry, market cap, PE ratio and company summary
  4. 4.Set HTTP_PROXY and HTTPS_PROXY environment variables if you need to access US stock data through a proxy

Use cases

Good for
  • Look up a Chinese company stock code when user mentions the company name (e.g., 'Moutai' → 600519)
  • Retrieve historical price data for a stock over a specific date range for analysis or charting
  • Get current fundamentals and market metrics for investment research or comparison
  • Analyze price trends across different markets (A-Share vs HK vs US listings of same company)
Who it's for
  • Financial analysts and investment researchers
  • Traders monitoring stock prices and market data
  • Anyone researching Chinese, Hong Kong, or US public companies
  • Portfolio managers tracking multiple market exchanges

alphaear-stock FAQ

What markets does this skill cover?

A-Share (mainland China), Hong Kong (HK), and US stock markets. A-Share and HK data comes via akshare/EastMoney; US data via yfinance.

How do I search for a stock if I only know the company name?

Use search_ticker(query) with the company name—it performs fuzzy matching and returns matching codes and names.

What date format should I use for price history queries?

Use YYYY-MM-DD format for both start_date and end_date parameters.

Do I need a proxy to use this skill?

A-Share and HK data usually work with direct connection in China. US data via yfinance may require proxy configuration if your network cannot reach Yahoo Finance.

What data does get_stock_fundamentals return?

Sector, industry, market cap, PE ratio, and a company summary for the given ticker.

Full instructions (SKILL.md)

Source of truth, from rkiding/awesome-finance-skills.


name: alphaear-stock description: Search A-Share/HK/US finance stock tickers and retrieve finance stock price history. Use when user asks about finance stock codes, recent price changes, or specific company finance stock info.

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".
  • Get Fundamentals: get_stock_fundamentals(ticker)
    • Returns dict with sector, industry, market cap, PE ratio, and summary.
    • Supports A-Share/HK/US stocks.

Dependencies

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

Notes

  • Proxy: For US stock data (via yfinance), you may need to set environment variables if your network cannot reach Yahoo Finance directly:
    export HTTP_PROXY="http://<proxy_ip>:<port>"
    export HTTPS_PROXY="http://<proxy_ip>:<port>"
    
  • A-Share/HK: Data is primarily fetched via akshare (EastMoney), which usually works best with a direct connection in China. The tool automatically detects proxy issues and attempts direct connection for these markets.