astock-data-source — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited astock-data-source (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
修复了住宅 IP 数据源被封问题:
| 优先级 | 数据源 | 实测可用 | 备注 |
|---|---|---|---|
| 1️⃣ | ifzq gtimg (腾讯) | ✅ 90%+ | 住宅 IP 首选 |
| 2️⃣ | 新浪 hq.sinajs.cn | ✅ 80%+ | 全市场列表也用这个 |
| 3️⃣ | 东财 push2.eastmoney | ❌ 30% | 经常被封, 仅作备用 |
| 4️⃣ | akshare | ✅ 85% | 聚合源, fallback |
自动 fallback 机制:
# 测试你的网络环境
python main.py healthcheck
# 输出示例:
# === 数据源健康检查 ===
# ✅ ifzq_gtimg
# ✅ sina_hq
# ❌ eastmoney_push2 (被风控, 已自动跳过)
# ✅ sina 全市场: 5028 只get-realtime --code X - 单股实时 (多源)get-realtime-all - 全 A 股实时 (用新浪)get-kline --code X --days N - K 线 (用 ifzq)get-index-realtime - 主要指数get-index-kline --symbol X - 指数 K 线get-stock-info --code X - 股票信息get-news --code X - 个股新闻healthcheck - 数据源健康检查# ✅ 正确: 用 --code 命名参数
python main.py get-realtime --code 601991
python main.py get-kline --code 601991 --days 60
# ✅ 正确: --list 列出方法
python main.py --list
# ❌ 旧版 (已废弃): 位置参数
python main.py get-realtime 601991from skills.01-infra.astock-data-source.main import (
get_realtime, get_realtime_all, get_kline
)
# 单股 (自动多源 fallback)
quote = get_realtime("601991")
# 全 A 股
all_stocks = get_realtime_all()
# K 线
df = get_kline("601991", days=60)| 现象 | 原因 | 解决 |
|---|---|---|
ProxyError: 7890 | 代理挡住外网 | 切到 ifzq/sina |
RemoteDisconnected | 东财被封 | 等待 3 次后自动切 |
UnicodeEncodeError (Win) | GBK 编码 | 已自动修复 |
所有数据源失败 | 网络隔离 | 运行 healthcheck 检查 |
requests>=2.28.0
akshare>=1.12.0
pandas>=1.5.0~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.