mcpField
A
alphaear-stock

alphaear-stock

github.com/rkidingOther3.1k1.2k installsUpdated 30w ago
Repository

About alphaear-stock

alphaear-stock is a skill for searching A-Share, Hong Kong, and US stock tickers and retrieving price history and fundamentals. It supports fuzzy lookup by ticker code or company name.

Key features

  1. 01Fuzzy ticker search
  2. 02Retrieve historical OHLCV data
  3. 03Retrieve company fundamentals
  4. 04Support A-Share, HK, and US stocks

Use cases

  1. 01Find a ticker by name or code
  2. 02Review historical stock prices
  3. 03Check sector, market cap, and PE ratio

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/rkiding/awesome-finance-skills --skill alphaear-stock

After installing, type/alphaear-stockin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

scripts/
__init__.py
database_manager.py
stock_tools.py
tests/
test_stock.py

Details

From the project README

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.

Comments

Markdown supported