← Back to Skills Marketplace
chenchunjiekk

fetch-stock-daily

by ChenchunjieKK · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
156
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install fetch-stock-daily
Description
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...
README (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.
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install fetch-stock-daily
  3. After installation, invoke the skill by name or use /fetch-stock-daily
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug fetch-stock-daily
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is 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... It is an AI Agent Skill for Claude Code / OpenClaw, with 156 downloads so far.

How do I install fetch-stock-daily?

Run "/install fetch-stock-daily" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is fetch-stock-daily free?

Yes, fetch-stock-daily is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does fetch-stock-daily support?

fetch-stock-daily is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created fetch-stock-daily?

It is built and maintained by ChenchunjieKK (@chenchunjiekk); the current version is v1.0.0.

💬 Comments