← 返回 Skills 市场
chenchunjiekk

fetch-stock-daily

作者 ChenchunjieKK · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
156
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install fetch-stock-daily
功能描述
Resolve a China A-share stock name or code in pure Node.js, fetch daily historical bars from Eastmoney HTTP APIs, and archive them as local JSON files. Use w...
使用说明 (SKILL.md)

Fetch Stock Daily JSON

Use this skill for the publishable Node.js path stock input -> symbol resolution -> daily history fetch -> raw JSON archive.

Quick Start

Run the Node.js helper from the repo root:

node skills/fetch-stock-daily-json/scripts/fetch_daily_json.js 贵州茅台
node skills/fetch-stock-daily-json/scripts/fetch_daily_json.js 600519 --years 3
node skills/fetch-stock-daily-json/scripts/fetch_daily_json.js 宁德时代 --start-date 20240101 --end-date 20260329 --adjust qfq

The script prints a JSON summary with the resolved symbol, row count, requested window, actual trade-date bounds, and saved file path.

Workflow

  1. Accept repo-compatible inputs only: 6-digit code, 600519.SH or 300750.SZ, or a Chinese stock name. Do not use sh600519.
  2. Prefer the bundled Node.js script instead of re-implementing the workflow in the task.
  3. Resolve stock names through the Eastmoney A-share list API and cache the code-name map locally.
  4. Fetch daily bars from the Eastmoney historical kline API with daily period and qfq/hfq/none adjustment.
  5. Save the archived rows under data/raw/eastmoney/daily_history/YYYYMMDD/\x3Csymbol>_\x3CHHMMSS>.json.
  6. Default to years=5 and adjust=qfq when the user does not provide a date window.
  7. Stop after JSON archive generation unless the user explicitly asks for downstream parsing, analysis, or DB sync.

Return Format

Return the script's JSON summary and call out:

  • resolved_symbol
  • rows
  • trade_date_min
  • trade_date_max
  • output_path

Failure Handling

  • If name resolution fails, ask for a valid 6-digit A-share code or Chinese stock name.
  • If the fetch returns zero rows, keep the archive file and report rows: 0.
  • If you need the JS-side API details or the parity notes versus the Python workflow, read references/lobsterclaw-workflow.md.
安全使用建议
This skill appears coherent and limited to fetching data from Eastmoney and writing local JSON files. Before installing, ensure you are comfortable with: (1) network calls to push2.eastmoney.com and push2his.eastmoney.com, (2) creation of files under data/cache/eastmoney and data/raw/eastmoney in your working directory (the script will cache symbol lists and archive results), and (3) running the script with a Node.js runtime that provides fetch and AbortSignal.timeout (Node 18+). No credentials are requested. If you prefer, run the script in an isolated/project workspace first to inspect the created files.
功能分析
Type: OpenClaw Skill Name: fetch-stock-daily Version: 1.0.0 The skill bundle is a legitimate tool for fetching and archiving Chinese A-share historical stock data from Eastmoney's public APIs. The core logic in `scripts/fetch_daily_json.js` uses standard Node.js built-ins to resolve stock symbols, fetch market data via HTTP, and save results to a local directory structure as described in `SKILL.md`. There is no evidence of data exfiltration, malicious execution, or prompt injection.
能力评估
Purpose & Capability
Name/description match the included Node.js script and README: resolving CN A‑share names/codes, calling Eastmoney list and historical kline APIs, and saving JSON archives. No unrelated credentials, binaries, or install steps are requested.
Instruction Scope
SKILL.md and the script stick to the stated workflow (resolve symbol -> fetch -> map rows -> write archive). The script performs network requests to eastmoney endpoints and reads/writes files under the repo (data/cache and data/raw). This file I/O and network access are expected for the task but are the primary side effects to be aware of.
Install Mechanism
Instruction-only skill with a bundled Node.js script and no install spec; nothing is downloaded or installed at runtime by the skill itself (lowest install risk).
Credentials
The skill declares no required environment variables or credentials. The code does not request or read external secrets; it only uses process.cwd() for local cache/archive paths.
Persistence & Privilege
The skill is not always-enabled and uses default autonomous invocation settings (normal). It does create persistent local files (cache and archived JSON) within the repository workspace; it does not modify other skills or system-wide config.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install fetch-stock-daily
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /fetch-stock-daily 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of fetch-stock-daily-json skill. - Resolves China A-share stock names or codes using Node.js. - Fetches daily historical OHLCV bars from Eastmoney APIs. - Archives results as local JSON files, providing a summary with symbol, row count, date range, and file path. - Supports input as 6-digit code, code with exchange suffix, or Chinese stock name. - Handles adjustable date ranges and adjustment types; defaults to 5 years and qfq adjustment if unspecified.
元数据
Slug fetch-stock-daily
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

fetch-stock-daily 是什么?

Resolve a China A-share stock name or code in pure Node.js, fetch daily historical bars from Eastmoney HTTP APIs, and archive them as local JSON files. Use w... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 156 次。

如何安装 fetch-stock-daily?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install fetch-stock-daily」即可一键安装,无需额外配置。

fetch-stock-daily 是免费的吗?

是的,fetch-stock-daily 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

fetch-stock-daily 支持哪些平台?

fetch-stock-daily 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 fetch-stock-daily?

由 ChenchunjieKK(@chenchunjiekk)开发并维护,当前版本 v1.0.0。

💬 留言讨论