一键导入
dasheng-finance-data
Draft 阶段按需金融数据增强工具。用于把 A 股/指数行情、估值与时间序列数据转成可直接嵌入 Draft HTML 的 Chart.js `chart_specs`。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Draft 阶段按需金融数据增强工具。用于把 A 股/指数行情、估值与时间序列数据转成可直接嵌入 Draft HTML 的 Chart.js `chart_specs`。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when Dasheng Publish needs to route Xiaohongshu publishing or content access through API-first CLI, MCP, or browser fallback bridges.
Use when Dasheng Publish needs to prepare, upload, or package Bilibili video submissions from completed transwrite video channel packs.
Use when running Stage 3 Draft from approved Brief topics and producing Reasoning Sheets, standard drafts, and draft quality gates.
Use when the workflow enters Postmortem after Publish and published content needs to be evaluated with performance data, Publish Guard status, accuracy checks, and knowledge-base writeback suggestions.
Use when Dasheng draft or transwrite needs HTML Anything templates, editable article HTML, social cards, posters, or visual HTML references.
Use when Dasheng transwrite needs no-human or human-material talking-head videos rendered through the local html-video project.
| name | dasheng-finance-data |
| description | Draft 阶段按需金融数据增强工具。用于把 A 股/指数行情、估值与时间序列数据转成可直接嵌入 Draft HTML 的 Chart.js `chart_specs`。 |
| version | 0.1.0 |
| stage | on-demand |
本 skill 借鉴 /Volumes/PSSD/Projects/boutique-openclaw-skills/skills/default/a-stock-data 的数据源优先级:
push2his 直连接口生成 K 线图表;接口断连时自动切换百度股市通 K 线。qt.gtimg.cn。yfinance。FMP_API_KEY 时可抓取 FMP Economic Calendar,并生成事件影响等级统计图。a-stock-data 巨型 skill 直接并入 Draft,避免引入 mootdx、研报、龙虎榜、两融等复杂依赖和风控负担。chart_specs,直接进入 03_HTML草稿_<topic>.html。在 topic_cards.json 或 --asset-specs-file 中给对应 topic_id 添加 data_requests 或兼容字段 finance_chart_requests:
{
"data_requests": [
{
"id": "ai-chain-indexed-performance",
"kind": "kline",
"claim_id": "topic-ai-claim-01",
"section_id": "section-01",
"metric_id": "close_price",
"title": "AI产业链核心标的走势对比",
"symbols": [
{"code": "300750", "label": "宁德时代"},
{"code": "002594", "label": "比亚迪"}
],
"start_date": "20250101",
"end_date": "20260601",
"field": "close",
"unit": "起点=100",
"normalize": true
}
]
}
全球市场例子:
{
"finance_chart_requests": [
{
"id": "cross-asset-performance",
"kind": "global_market",
"title": "美股、黄金与长债走势对比",
"symbols": [
{"ticker": "^GSPC", "label": "S&P 500"},
{"ticker": "GC=F", "label": "黄金期货"},
{"ticker": "TLT", "label": "美国长债ETF"}
],
"start_date": "20250101",
"end_date": "20260601",
"field": "close",
"normalize": true
}
]
}
经济日历例子:
{
"finance_chart_requests": [
{
"id": "macro-calendar-impact",
"kind": "economic_calendar",
"title": "未来两周高影响经济数据密度",
"from_date": "2026-06-01",
"to_date": "2026-06-14",
"countries": ["US", "CN", "JP"]
}
]
}
中国宏观例子:
{
"data_requests": [
{
"id": "china-cpi-yoy",
"kind": "china_macro",
"preset": "china_cpi",
"claim_id": "topic-macro-claim-01",
"title": "中国CPI同比走势",
"start_date": "20240101",
"end_date": "20260601"
}
]
}
中国地产/房价例子:
{
"data_requests": [
{
"id": "tier1-house-price-yoy",
"kind": "china_house_price",
"preset": "china_house_price",
"claim_id": "topic-property-claim-02",
"title": "一线城市新建商品住宅价格同比",
"cities": ["北京", "上海", "广州", "深圳"],
"field": "FIRST_COMHOUSE_SAME",
"transform": "delta_from_100",
"unit": "%"
}
]
}
当前内置 preset:
| preset | kind | 默认字段 | 说明 |
|---|---|---|---|
china_cpi | china_macro | NATIONAL_SAME | CPI同比 |
china_pmi | china_macro | MAKE_INDEX | 制造业PMI |
china_gdp | china_macro | SUM_SAME | GDP同比 |
china_money_supply | china_macro | BASIC_CURRENCY_SAME | 货币供应同比 |
china_rmb_loan | china_macro | RMB_LOAN_ACCUMULATE | 人民币贷款累计新增 |
china_house_price | china_house_price | FIRST_COMHOUSE_SAME | 新建商品住宅价格同比指数,默认 delta_from_100 转为涨跌幅 |
Draft 会自动把 finance_chart_requests 展开为 chart_specs:
labels:交易日期datasets:收盘价或指数化序列claim_id / section_id / metric_id:如请求中提供,会原样写入图表规格和 metasource:按实际数据源写入 东方财富 push2his K线、百度股市通 K线、Yahoo Finance Chart API、Yahoo Finance 本地缓存 等。source_url:按实际数据源写入东方财富、百度股市通或 Yahoo Finance。meta.provenance:来源、抓取时间、缓存状态、接口警告。meta.data_quality:数据点数量、缺失点数量、基础质量状态。finance_chart_failures:Draft 资产清单会记录请求级失败原因;只要有金融图表失败,asset_status 会标记为 incomplete。data_validation:Draft 资产清单会汇总请求数、生成数、失败数、警告数和整体状态。如果金融接口失败或返回空,Draft 不会崩溃,但 asset_status 会保持 incomplete,避免伪装成完成稿。
python3 scripts/finance_data_adapter.py chart-specs \
--requests-file /path/to/finance_chart_requests.json \
--output /path/to/chart_specs.json
如需同时查看失败明细:
python3 scripts/finance_data_adapter.py chart-specs \
--requests-file /path/to/finance_chart_requests.json \
--report
.cache/finance_data/yahoo_chart,用于降低限流影响;旧缓存只会在实时接口失败时标注为缓存来源,不伪装成实时数据。FMP_API_KEY;没有 key 时不得编造宏观日历。