← LeaderboardThe Skill Leaderboard

alphaear-stock

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.

Published by RKiding ↗RKiding/Awesome-finance-skills

Try your first task

Find a stock ticker by company name or code

Start a fresh conversation.

Use the alphaear-stock skill to fuzzy-search for `{company_or_code}`. Return the matching ticker candidates as code-and-name pairs, and briefly identify which candidate is most likely if the query is ambiguous. Do not retrieve price history yet.

Required inputs

  • `{company_or_code}`: an A-share, Hong Kong, or US company name or ticker code, such as `Moutai` or `600519`
  • Runtime setup: the skill's documented Python dependencies and stock-table database support

Suggested template by Skill Leaderboard, grounded in the linked source. Task evidence ↗

SKILL.md

name: alphaear-stockdescription: 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.