AgentSkillsCN

market-data

提供财经新闻检索、社交媒体话题抓取(Twitter/Reddit)以及文本情绪分析,适合热点追踪与情绪研判。

SKILL.md
--- frontmatter
name: market-data
description: 提供A股/美股/港股的实时行情、历史K线、指数批量查询、板块排行与成分、资金流向及市场成交额等数据能力,适合市场快照与基础分析。

Market Data Skill

Provides real-time quotes, historical K-lines, fund flow, sector data, and market turnover for A-share, HK, and US markets.

Capabilities

  • Quotes: Real-time price, volume, change for Stocks, ETFs, and Indices.
  • K-Line: Historical OHLCV data (Daily/Weekly/Monthly).
  • Indices: Bulk fetch key indices (CN/HK/US).
  • Sectors: Industry/Concept rankings and constituent stocks.
  • Fund Flow: North/South water, individual stock flow.
  • Turnover: Total market turnover (A-share).

Usage

CLI

bash
# Setup
./setup.sh
source .venv/bin/activate

# Get Quote
python scripts/market_data.py quote 600036
python scripts/market_data.py quote 上证指数

# Get Bulk Indices
python scripts/market_data.py indices CN

# Get K-Line (Limit 20)
python scripts/market_data.py kline 600036 --period daily --limit 20

# Get Sector Ranking
python scripts/market_data.py rank --type industry --limit 10

# Get Sector Constituents
python scripts/market_data.py constituents "酿酒行业" --limit 10

# Get Market Turnover
python scripts/market_data.py turnover

Python Import

python
from scripts.market_data import MarketDataSkill

skill = MarketDataSkill()
quote = skill.get_quote("600036")
kline = skill.get_kline("600036", limit=100)