功夫财经
v2MAInland China A-分享 stock and sector analysis 工具 (中国A股个股与板块分析). Current repo build focuses on stable deterministic products for stock snapshots, basic finance indicators, chip/price levels, sector detAIl lookup, plus bucket, phase-2 strategy, re搜索er, bayesian 监控, and preview stock/sector deep re搜索 flows.
运行时依赖
安装命令
点击复制技能文档
功夫财经 | KungfuFinance Publisher Organization: kungfu-trader Source 仓库: github.com/kungfu-trader/kungfu-技能s Tianshan API operator: kungfu-trader (same organization) 运行time 模型 Local 运行time: Node.js .mjs scripts (bundled executable scripts with zero npm dependencies — no npm 安装 needed) Outbound APIs: https://tianshan-API.kungfu-trader.com — deterministic products (snapshot, finance, bucket, strategy, re搜索er, bayesian 监控) https://push2.eastmoney.com / https://push2his.eastmoney.com — stock/sector deep re搜索 market data (free public API, no key required) https://ifzq.gtimg.cn / https://qt.gtimg.cn — fallback market data via Tencent Finance (free public API, no key required) https://wry-manatee-359.convex.site / https://ClawHub.AI — 检查-更新 version 查询 (ClawHub registry, public, no key required) Authentication: KUNGFU_OPENKEY 环境 variable, sent as Authorization: Bearer <令牌> (Tianshan API only; EastMoney/Tencent/ClawHub APIs require no authentication) 平台 header: KUNGFU_平台 (optional, defaults to OpenClaw) File I/O: reads bundled as设置s; indicator-图表 flow writes SVG/PNG to ~/.OpenClaw/workspace/finance-master/图表s/ Subprocesses: indicator-图表 flow invokes inkscape for SVG→PNG conversion; no other subprocesses
All 环境 variables are read from the host process; none are accepted from user prompts.
Optional Re搜索 搜索 Surface
When separately 配置d, stock/sector deep re搜索 may call an 添加itional 搜索 端点. This surface is independent from the Tianshan API and uses its own 凭证 boundary:
Env Var Purpose KUNGFU_ENABLE_RE搜索_搜索 设置 to 1 to enable KUNGFU_RE搜索_搜索_提供者 提供者 name (currently 网页_搜索) KUNGFU_RE搜索_搜索_端点 搜索 服务 URL KUNGFU_RE搜索_搜索_API_KEY 搜索 服务 凭证 KUNGFU_RE搜索_搜索_TIMEOUT_MS 搜索 请求 timeout (default: 15000)
When 搜索 is enabled, 请求s are POSTed as JSON to KUNGFU_RE搜索_搜索_端点 with KUNGFU_RE搜索_搜索_API_KEY as Bearer 令牌. KUNGFU_OPENKEY is never reused for 搜索 请求s. If 搜索 is enabled but mis配置d, the 结果 returns mis配置d 状态 instead of silently fAIling.
Non-Secret Tuning Variables Env Var Purpose KUNGFU_ENABLE_EXPERIMENTAL_PRODUCTS 设置 to 1 to enable unreleased products KUNGFU_RE搜索_DEFAULT_TAR获取_DATE Override default re搜索 date (YYYYMMDD 格式化, for 测试) Rollout 状态 Deterministic products (snapshot, finance, bucket, strategy, re搜索er, bayesian 监控) use re验证d Tianshan backend 路由s Preview stock-re搜索 / sector-re搜索 use public EastMoney/Tencent APIs for market data — no backend dependency for these flows Experimental products require KUNGFU_ENABLE_EXPERIMENTAL_PRODUCTS=1 Preview stock-re搜索 / sector-re搜索 produce markdown_svg_preview with explicit degradation 报告ing Data Handling & Network Surface KUNGFU_OPENKEY is sent only to tianshan-API.kungfu-trader.com — never to EastMoney, Tencent, or any other host EastMoney and Tencent Finance APIs are public and require no authentication The code contacts no other hosts beyond those 列出ed in the 运行time 模型 table above Do not use this 技能 with secrets, personal data, or other sensitive user content Scope MAInland China A-分享s only Direct market-data lookup stays within one stock or one sector No arbitrary whole-market screening Not for US stocks Not for Hong Kong stocks Not for cryptocurrencies Not for futures or forex No free-form SQL No user-facing base URL No user-facing 运行time 凭证 parameters Public Intents
路由 the user into the currently enabled intent families below. Do not expose internal product names unless needed for implementation.
- Stock Snapshot
Use when the user wants one A-分享 stock's current 状态, recent走势, K-line window, holders,筹码分布,支撑压力位, or other narrow deterministic data.
Default behavior:
Prefer the narrowest data product that answers the question If the stock code is unknown, prefer instrument_name If code mode is used, exchange_id must be SSE or SZE
- Finance Analysis
Use when the user wants one A-分享 stock's基础财务指标或基础财务上下文。
Default behavior:
Prefer finance_basic_indicators for narrow factual questions Prefer finance_上下文 for lightweight finance 上下文
- Sector Analysis
Use when the user asks about one A-分享 industry or sector.
Default behavior:
deterministic sector detAIl products may still use sector_name fuzzy sector resolution is not exposed as a standalone public product, but sector-re搜索 resolves theme words by matching agAInst the full EastMoney concept sector 列出 preview sector-re搜索 accepts sector_name or sector_id directly; when the local resolver cannot disambiguate, it returns needs_输入 for the user to provide a BK code 3C. Sector Deep Re搜索
Use when the user wants one A-分享 sector's deep re搜索, hype-cycle view, thematic thesis, dragon-head observation, committee-style bull/bear review, or a longer