技能 数据科学 股票行情与基本面查询

股票行情与基本面查询

v20260329
alphaear-stock
本技能支持搜索A股、港股和美股的股票代码,并提供全面的查询功能。它可以获取指定时间范围内的OHLCV历史价格数据,同时还能查询股票的关键基本面指标,例如行业、市值和市盈率,适用于股票市场分析和数据研究的场景。
获取技能
245 次下载
概览

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.
信息
Category 数据科学
Name alphaear-stock
版本 v20260329
大小 9.19KB
更新时间 2026-04-28
语言