Provides real-time quotes, historical K-lines, batch index queries, sector rankings and constituents, capital flow and market turnover data for A-shares, US stocks, and Hong Kong stocks — suitable for market snapshots and basic analysis.
Provides real-time quotes, historical K-lines, fund flow, sector data, and market turnover for A-share, HK, and US markets.
# 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
from scripts.market_data import MarketDataSkill
skill = MarketDataSkill()
quote = skill.get_quote("600036")
kline = skill.get_kline("600036", limit=100)
Category:stocks-finance