hubblevision/hubble-data-service-skill · Archived

cn-kline

A股K线数据查询。获取日线、周线、月线行? 当用户询问"?

First seen Apr 22, 2026

Installation

$ npx skills add hubblevision/hubble-data-service-skill --skill cn-kline

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from hubblevision/hubble-data-service-skill · top by installs.

npx skills add hubblevision/hubble-data-service-skill

Browse all from hubblevision/hubble-data-service-skill

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 25
Default branch main
Open issues 0
Status Archived

Skill metadata

Parsed from SKILL.md frontmatter.

Declared agents clawdbot
More metadata
openclaw
1.0.0
emoji
📈
install
# OpenClaw cp -r skills/cn-kline ~/.openclaw/skills/

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,545 B
  • docs SUMMARY.md 156 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 27 installs

SKILL.md

CN Kline — A股K线数据

所有接口均为 V2 版本(/api/v2/...)。

Curl Setup

BASE="http://43.167.234.49:3101"
AUTH=(-H "X-API-Key: 123456" -H "Content-Type: application/json")

代码格式规则

规则 值
参数名 symbol
代码格式 带交易所后缀
日期格式 YYYYMMDD
市场 示例
上交所 (SH) 600519.SH
深交所 (SZ) 000001.SZ
北交所 (BJ) 430047.BJ

❌ 错误写法:600519(纯数字)、SH600519


端点详情

GET /api/v2/cnstock/stocks

Parameter Type Required Description Example
symbol string Yes 股票代码(带后缀) 000001.SZ
interval string No daily (默认), weekly, monthly daily
startDate string No YYYYMMDD 20240101
endDate string No YYYYMMDD 20240131
limit int No 1-5000 (默认 100) 500

调用示例

# 最近100根日线(默认)
curl -sS "${AUTH[@]}" "$BASE/api/v2/cnstock/stocks?symbol=000001.SZ"

# 指定区间
curl -sS "${AUTH[@]}" "$BASE/api/v2/cnstock/stocks?symbol=000001.SZ&startDate=20240101&endDate=20240131"

# 周线
curl -sS "${AUTH[@]}" "$BASE/api/v2/cnstock/stocks?symbol=600519.SH&interval=weekly&limit=50"

# 月线
curl -sS "${AUTH[@]}" "$BASE/api/v2/cnstock/stocks?symbol=300750.SZ&interval=monthly&limit=24"

# 多股票K线并行
curl -sS "${AUTH[@]}" "$BASE/api/v2/cnstock/stocks?symbol=002594.SZ&limit=10" &
curl -sS "${AUTH[@]}" "$BASE/api/v2/cnstock/stocks?symbol=300750.SZ&limit=10" &
wait

响应示例:

{
  "symbol": "000001.SZ",
  "interval": "daily",
  "data": [
    {"time": 1704067200000, "open": 10.50, "high": 10.80, "low": 10.40, "close": 10.70, "volume": 1234567, "adjFactor": 1.0}
  ],
  "total": 500
}

错误排查

错误 原因 修复
404 symbol 格式错误 用 600519.SH,不要 600519
空数据 日期区间无交易日 检查日期范围是否合理
400 日期格式错误 用 YYYYMMDD,如 20240101