OpenParable
Skip to content
← Back to skills

Alphaear Stock

Research
alphaear-stock

Alphaear Stock is an Agent Skill for research published in the RKiding/Awesome-finance-skills repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

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.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/RKiding/Awesome-finance-skills/blob/HEAD/skills/alphaear-stock/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/alphaear-stock, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

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.