jrj-quote-skill金融界A股行情数据

v1.0.1

A股实时行情和历史K线数据查询,支持技术指标计算。用于获取股票、场内基金、指数的实时价格、历史K线,以及计算MA、MACD、KDJ、BOLL、RSI等技术指标。 <example>User: "获取招商银行最近30天的历史K线和MACD指标" Assistant: 使用 kline.js 脚本获取数据</exam...

1· 113·0 current·0 all-time
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description promise (real-time quotes, historical K‑lines, indicators) matches the included scripts and API endpoints. The skill only asks for JRJ_API_KEY which is exactly the API credential needed to call the documented JRJ endpoints.
Instruction Scope
SKILL.md instructs the agent to call quant-gw.jrj.com endpoints and run scripts/kline.js, and the script's runtime behavior matches those instructions. There are no instructions to read unrelated local files, harvest other environment variables, or transmit data to third‑party endpoints beyond the documented API host.
Install Mechanism
There is no install spec (instruction-only/inline script) which is low risk. However, the skill includes scripts/kline.js that is intended to be run with node; the registry metadata lists no required binaries. The lack of a declared required binary for Node is a minor inconsistency (the runtime requires Node to execute the script).
Credentials
Only JRJ_API_KEY is required (declared as primaryEnv). The script optionally reads JRJ_API_URL if set, but does not access other secrets or unrelated env vars. The requested credential is proportionate to the described functionality.
Persistence & Privilege
The skill is not forced-always, does not request persistent system privileges, and does not modify other skills or system-wide configs. Autonomous invocation is enabled by default but is not combined with other red flags here.
Assessment
This skill appears coherent and implements the advertised functionality. Before installing, confirm: (1) you trust the JRJ API endpoint (quant-gw.jrj.com) and your JRJ_API_KEY source, since the skill sends that key in requests; (2) Node.js will be available where the skill runs (SKILL.md uses `node scripts/kline.js` but Node is not listed in required binaries); (3) API key permissions, quotas and rate limits — a compromised key could be abused or hit quota limits; (4) run first in a restricted/sandboxed environment if you want to inspect behavior while providing a test key. If you need higher assurance, review the full scripts/kline.js file locally (it is included) to verify there are no modifications or network calls to unexpected hosts.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

EnvJRJ_API_KEY
Primary envJRJ_API_KEY
latestvk9750mrpayhwc6h804mcxh3gjd845wsk
113downloads
1stars
2versions
Updated 1w ago
v1.0.1
MIT-0

金融界A股行情数据技能(JRJ Quote Skill)

为大模型提供权威、实时、准确的 A 股市场数据,杜绝过时/错误信息输出,支持行情查询、K 线获取、技术指标一站式计算。

核心功能

1、获取股票、场内基金、指数的实时行情数据 2、获取A股历史日K线数据,支持前复权/后复权/不复权 3、基于K线数据本地计算技术指标

使用场景

1、基础行情查询场景

实时行情查询 用户询问单只 / 多只股票、指数、场内基金的当前价格、涨跌幅、成交量等实时数据。 证券基本信息查询 查询股票名称、市场(沪 / 深)、交易状态等基础信息。

2、K 线与历史数据场景

历史走势复盘 获取指定股票日 K 线、前复权 / 后复权数据,用于历史走势分析。 区间行情统计 查询某只股票近 N 日 / 某时间段的开盘、最高、最低、收盘、成交额等数据。

3、技术指标分析场景

趋势类指标分析 基于 MA、MACD 判断中期 / 长期趋势、金叉死叉。 超买超卖判断 使用 RSI、KDJ、WR 识别高位超买、低位超卖信号。 波动与支撑压力分析 通过 BOLL、ATR 判断价格波动区间、支撑位与压力位。 量价关系分析 结合成交量均线、OBV 评估量价配合度。

4、AI 助手典型对话场景

帮用户分析近 30 日走势 + 均线 + MACD,给出趋势判断。 根据 KDJ、RSI 指标,提示当前是否处于超买 / 超卖区间。 输出格式化 K 线表格,方便用户快速查看。 结合多指标给出技术面简要解读,辅助投资参考。

5、功能集成场景

接入AI 量化分析系统,作为行情数据底层能力。 为投顾助手、选股机器人、复盘工具提供数据支持。 用于回测框架、指标研究、策略验证等量化研究场景。

环境配置

# 必须设置以下环境变量
export JRJ_API_KEY=sk_live_xxx   # API Key

快速开始

获取实时行情

# 调用 API 获取实时行情
curl -X POST "https://quant-gw.jrj.com/v1/quote/realtime" \
  -H "X-API-Key: ${JRJ_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{"symbols": ["600036.SH", "000001.SZ"]}'

获取历史K线数据

使用 scripts/kline.js 脚本:

# 只获取历史K线(不计算指标)
node scripts/kline.js --symbol=600036.SH

# 获取历史K线 + 计算指标
node scripts/kline.js --symbol=600036.SH --with=ma,macd

# 完整参数示例
node scripts/kline.js \
  --symbol=600036.SH \
  --period=daily \
  --adjust=qfq \
  --limit=100 \
  --with=ma,macd,kdj \
  --format=json

命令行参数

参数必填默认值说明
--symbol-证券代码,如 600036.SH
--perioddailyK线周期:目前只支持 daily
--adjustnone复权类型:none/qfq(前复权)/hfq(后复权)
--limit100K线数量
--start-date-起始日期 YYYYMMDD,从该日期往最新方向取
--with-计算指标,逗号分隔,见下表
--formatjson输出格式:json/markdown

技术指标

可用指标组

组名包含指标说明
mama5, ma10, ma20, ma60移动平均线
macdmacd_dif, macd_dea, macd_histMACD指标
kdjkdj_k, kdj_d, kdj_jKDJ随机指标
bollboll_upper, boll_mid, boll_lower布林带
rsirsi6, rsi12, rsi24相对强弱指标
wrwr14威廉指标
obvobv, obv_ma20能量潮指标
atratr, atr_ma14真实波幅
volvol_ma5, vol_ma10成交量均线
ccicci顺势指标
rocroc变动率指标

使用示例

# 使用指标组
node scripts/kline.js --symbol=600036.SH --with=ma,macd

# 使用单个指标
node scripts/kline.js --symbol=600036.SH --with=ma5,ma20,macd_dif

# 混合使用
node scripts/kline.js --symbol=600036.SH --with=ma,rsi6,kdj_k

指标说明

脚本会自动请求足够的历史数据以确保指标计算准确。例如计算 ma60 时,会额外请求 60 根K线用于预热,最终返回用户请求的数量。

详细指标说明见 references/indicators-guide.md

关于返回数量

当请求的数据量较大时,API 可能无法一次返回全部结果。此时响应会包含 truncated: true 标记,脚本会提示:

  • 无指标计算时:"可能有更多历史数据未返回"
  • 有指标计算时:"指标计算可能不准确(预热数据不足)"

如遇此情况,建议调整 --limit 值或使用 --start-date 缩小查询范围。

API 接口

实时行情

POST /v1/quote/realtime

请求参数

{
  "symbols": ["600036.SH", "000001.SZ"]  // 最多 100 个
}

响应示例

{
  "code": 0,
  "msg": "success",
  "data": {
    "trade_date": 20260320,
    "quotes": [
      {
        "symbol": "600036.SH",
        "name": "招商银行",
        "price": 39.00,
        "change_pct": 0.0125,
        "volume": 12345678,
        "amount": 480000000
      }
    ]
  }
}

K线数据

POST /v1/quote/kline

获取已收盘的历史日K线数据。

请求参数

{
  "symbol": "600036.SH",
  "period": "daily",
  "adjust": "qfq",
  "limit": 100,
  "start_date": 20260101
}

响应示例

{
  "code": 0,
  "msg": "success",
  "data": {
    "symbol": "600036.SH",
    "period": "daily",
    "adjust": "qfq",
    "count": 100,
    "klines": [
      {
        "date": 20260320,
        "open": 38.50,
        "high": 39.20,
        "low": 38.30,
        "close": 39.00,
        "volume": 12345678,
        "amount": 480000000
      }
    ],
    "truncated": true
  }
}

注意:当 truncated: true 时,表示可能有更多数据未返回。

详细 API 文档见 references/api-reference.md

输出格式

JSON 格式(默认)

{
  "symbol": "600036.SH",
  "period": "daily",
  "adjust": "qfq",
  "count": 100,
  "klines": [
    {
      "date": 20260320,
      "open": 38.50,
      "high": 39.20,
      "low": 38.30,
      "close": 39.00,
      "volume": 12345678,
      "amount": 480000000,
      "ma5": 38.80,
      "ma20": 37.50,
      "macd_dif": 0.35,
      "macd_dea": 0.28,
      "macd_hist": 0.07
    }
  ]
}

Markdown 格式

node scripts/kline.js --symbol=600036.SH --with=ma --format=markdown

输出:

## 600036.SH K线数据

| 日期 | 开盘 | 最高 | 最低 | 收盘 | 成交量 | MA5 | MA20 |
|------|------|------|------|------|--------|-----|------|
| 20260320 | 38.50 | 39.20 | 38.30 | 39.00 | 1234万 | 38.80 | 37.50 |

常见用例

1. 趋势分析

# 查看均线和MACD判断趋势
node scripts/kline.js --symbol=600036.SH --with=ma,macd --limit=60

2. 超买超卖判断

# 使用RSI和KDJ判断
node scripts/kline.js --symbol=600036.SH --with=rsi,kdj --limit=30

3. 波动性分析

# 布林带和ATR
node scripts/kline.js --symbol=600036.SH --with=boll,atr --limit=60

4. 量价分析

# 成交量均线和OBV
node scripts/kline.js --symbol=600036.SH --with=vol,obv --limit=60

错误处理

错误码说明
40001参数错误(如 symbol 格式不正确)
40101API Key 无效,请前往金融界App获取最新API Key
42901超出请求限制,请稍后再试
42902超出每日配额,请前往金融界App获取每日更多配额

参考文档


免责声明

  1. 数据仅供参考:本工具提供的行情数据和技术指标仅供学习和研究使用,不构成任何投资建议。
  2. 准确性不保证:虽然我们尽力保证数据准确,但不对数据的完整性、准确性或时效性作任何保证。
  3. 投资风险:股票投资有风险,投资者应独立判断并承担投资决策的全部责任。
  4. 技术指标局限性:技术指标基于历史数据计算,不能预测未来走势,仅供辅助分析参考。
  5. 使用限制:本工具仅限个人学习研究使用,禁止用于商业用途或非法活动。

Comments

Loading comments...