Xpersona
J

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

CLAWHUB · Unverified

A股实时行情和历史K线数据查询,支持技术指标计算。用于获取股票、场内基金、指数的实时价格、历史K线,以及计算MA、MACD、KDJ、BOLL、RSI等技术指标。 <example>User: "获取招商银行最近30天的历史K线和MACD指标" Assistant: 使用 kline.js 脚本获取数据</exam... Skill: jrj-quote-skill金融界A股行情数据 Owner: haomanjia Summary: A股实时行情和历史K线数据查询,支持技术指标计算。用于获取股票、场内基金、指数的实时价格、历史K线,以及计算MA、MACD、KDJ、BOLL、RSI等技术指标。 <example>User: "获取招商银行最近30天的历史K线和MACD指标" Assistant: 使用 kline.js 脚本获取数据</exam... Tags: latest:1.0.1 Version history: v1.0.1 | 2026-04-03T08:04:39.960Z | user - 增加了 metadata 字段,声明环境变量需求与 homepage。 - skill 功能和接口无变化。 - 兼容性与行为与 1.0.0 完全一致。 v1.0.0 | 2026-04-03T02:53:46.786Z | user jrj-q

62
Rank
84
Safety
1.1k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.1K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s17fr3m1e18eaqs2a5b3n9y98983krth:jrj-quote-skill
  1. Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-haomanjia-jrj-quote-skill/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

34,197 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: jrj-quote-skill
description: >-
  A股实时行情和历史K线数据查询,支持技术指标计算。用于获取股票、场内基金、指数的实时价格、历史K线,以及计算MA、MACD、KDJ、BOLL、RSI等技术指标。
  <example>User: "获取招商银行最近30天的历史K线和MACD指标" Assistant: 使用 kline.js 脚本获取数据</example>
  <example>User: "查看贵州茅台的实时行情" Assistant: 调用 /v1/quote/realtime 接口</example>
metadata:
  {"openclaw": {"requires": {"env": ["JRJ_API_KEY"]}, "primaryEnv": "JRJ_API_KEY", "homepage": "https://ai.jrj.com.cn/claw"}}
---

# 金融界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 量化分析系统,作为行情数据底层能力。
为投顾助手、选股机器人、复盘工具提供数据支持。
用于回测框架、指标研究、策略验证等量化研究场景。

## 环境配置

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

## 快速开始

### 获取实时行情

```bash
# 调用 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` 脚本:

```bash
# 只获取历史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 |
| `--period` | 否 | daily | K线周期:目前只支持 daily |
| `--adjust` | 否 | none | 复权类型:none/qfq(前复权)/hfq(后复权) |
| `--limit` | 否 | 100 | K线数量 |
| `--start-date` | 否 | - | 起始日期 YYYYMMDD,从该日期往最新方向取 |
| `--with` | 否 | - | 计算指标,逗号分隔,见下表 |
| `--format` | 否 | json | 输出格式:json/markdown |

## 技术指标

### 可用指标组

| 组名 | 包含指标 | 说明 |
|------|----------|------|
| `ma` | ma5, ma10, ma20, ma60 | 移动平均线 |
| `macd` | macd_dif, macd_dea, macd_hist | MACD指标 |
| `kdj` | kdj_k, kdj_d, kdj_j | KDJ随机指标 |
| `boll` | boll_upper, boll_mid, boll_lower | 布林带 |
| `rsi` | rsi6, rsi12, rsi24 | 相对强弱指标 |
| `wr` | wr14 | 威廉指标 |
| `obv` | obv, obv_ma20 | 能量潮指标 |
| `atr` | atr, atr_ma14 | 真实波幅 |
| `vol` | vol_ma5, vol_ma10 | 成交量均线 |
| `cci` | cci | 顺势指标 |
| `roc` | roc | 变动率指标 |

### 使用示例

```bash
# 使用指标组
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线用于预热,最终返回用户请求的数量。

详细指标说明见 [refere

_meta.json

{
  "ownerId": "kn7edvnsec7tx773akp8yhg5ws833a13",
  "slug": "jrj-quote-skill",
  "version": "1.0.1",
  "publishedAt": 1775203479960
}

references/api-reference.md

# API 接口参考

## 认证

所有 API 请求需要在 Header 中携带 API Key:

```
X-API-Key: sk_live_xxx
```

## 响应格式

**成功响应**:
```json
{
  "code": 0,
  "msg": "success",
  "data": { ... }
}
```

**错误响应**:
```json
{
  "code": 40001,
  "msg": "错误信息",
  "data": { ... }
}
```

## 错误码

| 错误码 | HTTP 状态 | 说明 |
|--------|----------|------|
| 0 | 200 | 成功 |
| 40001 | 400 | 参数错误 |
| 40101 | 401 | API Key 无效,请前往金融界App获取最新API Key |
| 40102 | 401 | API Key 已过期,请前往金融界App获取最新API Key |
| 42901 | 429 | 超出每分钟请求限制,请稍后再试 |
| 42902 | 429 | 超出每日配额,请前往金融界App获取每日更多配额 |
| 50001 | 500 | 服务器内部错误 |
| 50201 | 502 | 上游服务错误 |

---

## 实时行情

获取股票、基金、指数的实时行情数据。

### 请求

```
POST /v1/quote/realtime
```

### 参数

| 参数 | 类型 | 必填 | 说明 |
|------|------|------|------|
| symbols | string[] | 是 | 证券代码列表,最多 100 个 |

### 请求示例

```json
{
  "symbols": ["600036.SH", "000001.SZ", "000001.SH"]
}
```

### 响应字段

| 字段 | 类型 | 说明 |
|------|------|------|
| trade_date | int | 交易日 YYYYMMDD |
| quotes | Quote[] | 行情列表 |

**Quote 对象**:

| 字段 | 类型 | 说明 |
|------|------|------|
| symbol | string | 证券代码 |
| code | string | 原始代码 |
| name | string | 证券名称 |
| type | string | 类型:stock/fund/bond/index/sector |
| trade_date | int | 交易日 YYYYMMDD |
| time | int | 行情时间 HHMMSS |
| status | int | 交易状态:1=已收盘, 5=交易中, 7=停牌 |
| prev_close | float | 前收盘价 |
| open | float | 开盘价 |
| high | float | 最高价 |
| low | float | 最低价 |
| price | float | 最新价 |
| change | float | 涨跌额 |
| change_pct | float | 涨跌幅(小数) |
| volume | int | 成交量(股) |
| amount | float | 成交额(元) |
| bid_prices | float[] | 申买价(5档) |
| bid_volumes | int[] | 申买量(5档,手) |
| ask_prices | float[] | 申卖价(5档) |
| ask_volumes | int[] | 申卖量(5档,手) |
| bid_total_volume | int | 委买总量 |
| ask_total_volume | int | 委卖总量 |
| limit_up | float | 涨停价(仅股票/基金) |
| limit_down | float | 跌停价(仅股票/基金) |
| pe | float | 市盈率(仅股票) |
| iopv | float | IOPV(仅 ETF) |
| up_count | int | 上涨家数(仅指数/板块) |
| down_count | int | 下跌家数(仅指数/板块) |
| flat_count | int | 平盘家数(仅指数/板块) |

### 响应示例

```json
{
  "code": 0,
  "msg": "success",
  "data": {
    "trade_date": 20260320,
    "quotes": [
      {
        "symbol": "600036.SH",
        "code": "600036",
        "name": "招商银行",
        "type": "stock",
        "trade_date": 20260320,
        "time": 150000,
        "status": 1,
        "prev_close": 38.50,
        "open": 38.60,
        "high": 39.20,
        "low": 38.30,
        "price": 39.00,
        "change": 0.50,
        "change_pct": 0.013,
        "volume": 12345678,
        "amount": 480000000,
        "bid_prices": [38.99, 38.98, 38.97, 38.96, 38.95],
        "bid_volumes": [100, 200, 150, 300, 250],
        "ask_prices": [39.00, 39.01, 39.02, 39.03, 39.04],
        "ask_volumes": [150, 100, 200, 180, 120],
        "limit_up": 42.35,
        "limit_down": 34.65,
        "pe": 6.5
      }
    ]
  }
}
```

---

## K线数据

获取股票、基金、指数的历史日 K 线数据(只返回已收盘的历史数据)。

### 请求

```
POST /v1/quote/kline
```

### 参数

| 参数 | 类型 | 必填 | 默认值 | 说明 |
|------|------|------|--------|------|
| symbol | string | 是 | - | 证券代码 |
| period | string | 否 | d

references/indicators-guide.md

# 技术指标说明

## 概述

本脚本支持计算常用的技术分析指标,指标会自动请求足够的历史数据以确保计算准确。

## 指标组详解

### MA - 移动平均线

移动平均线是最基础的趋势指标,通过计算一定周期内的平均价格来平滑价格波动。

| 指标 | 周期 | 说明 |
|------|------|------|
| ma5 | 5日 | 短期均线,反映近期趋势 |
| ma10 | 10日 | 短期均线 |
| ma20 | 20日 | 中期均线,月线 |
| ma60 | 60日 | 中期均线,季线 |
| ma250 | 250日 | 长期均线,年线(需单独请求) |

**使用建议**:
- 金叉(短期上穿长期)→ 可能上涨
- 死叉(短期下穿长期)→ 可能下跌
- 多头排列(ma5 > ma10 > ma20)→ 强势上涨
- 空头排列(ma5 < ma10 < ma20)→ 弱势下跌

```bash
node kline.js --symbol=600036.SH --with=ma
```

---

### MACD - 指数平滑异同移动平均线

MACD 由 DIF(差离值)、DEA(信号线)和柱状图组成,是判断趋势强弱和转折的重要指标。

| 指标 | 说明 |
|------|------|
| macd_dif | DIF = EMA(12) - EMA(26) |
| macd_dea | DEA = EMA(DIF, 9) |
| macd_hist | 柱状图 = (DIF - DEA) × 2 |

**使用建议**:
- DIF 上穿 DEA(金叉)→ 买入信号
- DIF 下穿 DEA(死叉)→ 卖出信号
- 柱状图由负转正 → 做多
- 柱状图由正转负 → 做空
- DIF/DEA 在零轴上方 → 多头市场
- DIF/DEA 在零轴下方 → 空头市场

```bash
node kline.js --symbol=600036.SH --with=macd
```

---

### KDJ - 随机指标

KDJ 指标通过最高价、最低价和收盘价计算,用于判断超买超卖。

| 指标 | 说明 |
|------|------|
| kdj_k | K 值(快线) |
| kdj_d | D 值(慢线) |
| kdj_j | J 值 = 3K - 2D |

**取值范围**:0 ~ 100(J 值可能超出)

**使用建议**:
- K > 80, D > 80 → 超买,可能回调
- K < 20, D < 20 → 超卖,可能反弹
- K 上穿 D(金叉)→ 买入信号
- K 下穿 D(死叉)→ 卖出信号
- J 值极端(>100 或 <0)→ 强烈信号

```bash
node kline.js --symbol=600036.SH --with=kdj
```

---

### BOLL - 布林带

布林带由中轨(MA20)和上下轨(±2倍标准差)组成,用于判断价格波动区间。

| 指标 | 说明 |
|------|------|
| boll_upper | 上轨 = MA20 + 2×标准差 |
| boll_mid | 中轨 = MA20 |
| boll_lower | 下轨 = MA20 - 2×标准差 |

**使用建议**:
- 价格触及上轨 → 可能超买
- 价格触及下轨 → 可能超卖
- 带宽收窄 → 变盘在即
- 带宽扩大 → 趋势延续
- 价格沿上轨运行 → 强势上涨
- 价格沿下轨运行 → 弱势下跌

```bash
node kline.js --symbol=600036.SH --with=boll
```

---

### RSI - 相对强弱指标

RSI 通过比较平均涨幅和平均跌幅来衡量价格变动的速度和幅度。

| 指标 | 周期 | 说明 |
|------|------|------|
| rsi6 | 6日 | 短期 RSI,灵敏度高 |
| rsi12 | 12日 | 中期 RSI |
| rsi24 | 24日 | 长期 RSI,平滑 |

**取值范围**:0 ~ 100

**使用建议**:
- RSI > 70 → 超买
- RSI < 30 → 超卖
- RSI > 80 → 强烈超买,可能见顶
- RSI < 20 → 强烈超卖,可能见底
- RSI 背离(价格新高但 RSI 未新高)→ 趋势可能反转

```bash
node kline.js --symbol=600036.SH --with=rsi
```

---

### WR - 威廉指标

威廉指标与 KDJ 类似,用于判断超买超卖,但取值范围为负数。

| 指标 | 周期 | 说明 |
|------|------|------|
| wr14 | 14日 | 威廉指标 |

**取值范围**:-100 ~ 0

**使用建议**:
- WR > -20 → 超买(接近 0)
- WR < -80 → 超卖(接近 -100)

```bash
node kline.js --symbol=600036.SH --with=wr
```

---

### OBV - 能量潮

OBV 通过累加或累减成交量来衡量资金流向。

| 指标 | 说明 |
|------|------|
| obv | 能量潮值(股) |
| obv_ma20 | OBV 的 20 日均线 |

**使用建议**:
- OBV 上升 + 价格上涨 → 量价配合,趋势健康
- OBV 下降 + 价格上涨 → 量价背离,可能见顶
- OBV 上升 + 价格下跌 → 资金吸筹,可能见底
- OBV 突破前高 → 买入信号
- OBV 跌破前低 → 卖出信号

```bash
node kline.js --symbol=600036.SH --with=obv
```

---

### ATR - 真实波幅

ATR 衡量价格的波动程度,用于设置止损和判断波动率。

| 指标 | 说明 |
|------|------|
| atr | 14 日平均真实波幅 |
| atr_ma14 | ATR 的 14 日均线 |

**使用建议**:
- ATR 扩大 → 波动加剧
- ATR 收窄 → 波动减小
- 止损设置:买入价 - 2×ATR
- 止盈设置:买入价 + 3×ATR

```bash
node kline.js --symbol=600036.SH --with=atr
```

---

### VOL - 成交量均线

成交量均线用于判断量能变化。

| 指标 | 说明 |
|------|------|
| vol_ma5 | 5 日成交量均线 |
| vol_ma10 | 10 日成交量均线 |

**使用建议**:
- 成交量 > vol_ma5 → 放量
- 成交量 < vol_ma5 → 缩量
- 放量上涨 → 多头强势
- 缩量上涨 → 可能见顶
- 放量下跌 → 空头强势
- 缩量下跌 → 可能见

skill-card.md

## Description:

A股实时行情和历史K线数据查询,支持技术指标计算,用于获取股票、场内基金、指数的实时价格、历史K线,以及计算MA、MACD、KDJ、BOLL、RSI等技术指标。

This skill is for research and development only.

## Publisher:

[haomanjia](https://clawhub.ai/user/haomanjia)

### License/Terms of Use:

MIT-0

## Use Case:

External users, developers, and AI assistants use this skill to retrieve A-share real-time quotes, historical daily K-line data, and local technical indicators for market review, formatted tables, and quantitative-analysis workflows. The artifact states that market data and indicators are for learning and research support and do not constitute investment advice.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: The kline script can send JRJ_API_KEY to an arbitrary HTTP or HTTPS endpoint if JRJ_API_URL is set.

Mitigation: Install only after review, use a JRJ_API_KEY acceptable for this environment, and leave JRJ_API_URL unset unless the destination is fully trusted; the publisher should remove or strictly validate endpoint overrides.

Risk: Market data and technical indicators can be mistaken for investment advice or predictions.

Mitigation: Present outputs as informational analysis support only and require users to make independent investment decisions.

Risk: Indicator calculations can be incomplete when the upstream response is truncated or insufficient warmup data is available.

Mitigation: Review truncation warnings, adjust limit or start-date parameters, and avoid relying on indicators until enough historical data is available.

## Reference(s):

- [ClawHub skill page](https://clawhub.ai/haomanjia/skills/jrj-quote-skill)
- [JRJ Claw homepage](https://ai.jrj.com.cn/claw)
- [API interface reference](artifact/references/api-reference.md)
- [Technical indicators guide](artifact/references/indicators-guide.md)

## Skill Output:

**Output Type(s):** [text, markdown, shell commands, configuration, guidance]

**Output Format:** [JSON or Markdown tables, with shell command and API call examples]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Requires JRJ_API_KEY. The kline script can output JSON by default or Markdown when requested.]

## Skill Version(s):

1.0.1 (source: server release metadata)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to jrj-quote-skill金融界A股行情数据 and adjacent AI workflows.