返回顶部
f

fetch-stock-daily-json

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 when the request is about 日线, 历史K线, daily history, candles, OHLCV, raw market data export, or stock-name-or-code to API to JSON persistence for inputs such as 600519, 300750.SZ, or 贵州茅台.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
102
下载量
0
收藏
概述
安装方式
版本历史

fetch-stock-daily-json

# 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: ```bash 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/<symbol>_<HHMMSS>.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`.

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 fetch-stock-daily-1775942042 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 fetch-stock-daily-1775942042 技能

通过命令行安装

skillhub install fetch-stock-daily-1775942042

下载 Zip 包

⬇ 下载 fetch-stock-daily-json v1.0.0

文件大小: 7.79 KB | 发布时间: 2026-4-12 09:57

v1.0.0 最新 2026-4-12 09:57
- 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.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部