Xpersona
S

stockClaw-yingyan 股票量化助手,可以获取个股择时量化图,个股行情分析,AI搜索特定股票,监控股买卖点变化通知。

CLAWHUB · Unverified

为该股票量化项目提供 OpenClaw 接入说明,支持股票量化图生成、股票行情问答、自然语言 AI 搜股与 WebSocket 实时监控信号推送。凭证须从与本 Skill 同目录的 config.json 中 openclawCredentials 读取:user_id 与 openClaw_api_key 为必...

62
Rank
84
Safety
1.3k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.3K downloads reported by the source. Last updated 10/10/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 s17ah1z7p795zzgh5ca8n1pz4s83hy9w:stockclaw-yingyan
  1. Install using `clawhub skill install s17ah1z7p795zzgh5ca8n1pz4s83hy9w:stockclaw-yingyan` in an isolated environment before connecting it to live workloads.
  2. No published capability contract is available yet, so validate auth and request/response behavior manually.
  3. Review the upstream CLAWHUB listing at https://clawhub.ai/woshixihongtu-cyber/stockclaw-yingyan before using production credentials.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-woshixihongtu-cyber-stockclaw-yingyan/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

144,993 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: stockClaw-yingyan
description: 为该股票量化项目提供 OpenClaw 接入说明,支持股票量化图生成、股票行情问答、自然语言 AI 搜股与 WebSocket 实时监控信号推送。凭证须从与本 Skill 同目录的 config.json 中 openclawCredentials 读取:user_id 与 openClaw_api_key 为必填(用于所有需鉴权的 HTTP 接口,请求体/查询参数中字段名仍为 apikey);monitor_api_key 为选填,仅 WebSocket 实时监控需要,不订阅监控可不配置。首次配置或用户在对话中修改后写回 config.json;禁止在配置已有效时重复索要;用户也可直接编辑 config.json 修改凭证。
---

# stockClaw-yingyan

## 适用场景
- 用户只发送股票名称或股票代码
- 用户发送"股票名称/股票代码 + 行情"
- 用户发送自然语言选股条件,想搜索某一类股票
- 用户要查询今天有哪些涨停股
- 用户要接收实时监控信号推送

## 输入规则
1. 如果消息只包含股票名称或股票代码,调用 `POST /api/openclaw/stock/message`
2. 如果消息包含"行情"关键词,调用 `POST /api/openclaw/stock/message`
3. 如果消息是自然语言选股条件,调用 `POST /api/openclaw/stock/query`
4. 如果用户明确要查询涨停股股票列表,调用 `GET /api/openclaw/stock/limit-up`
5. 如果要接收实时信号推送,先调用 `GET /api/openclaw/stock/monitor/stream` 获取 WebSocket 连接模板

### 自然语言 AI 搜股意图识别
满足以下特征时,应优先判断为"自然语言 AI 搜股":
- 用户在描述一类股票,而不是单只股票,例如:"涨幅超过 8% 的科技股"、"换手率高的深圳股票"、"近 20 日涨幅靠前的半导体股票"
- 用户带有筛选、排序、区间、排除、前 N 名等表达,例如:"大于"、"小于"、"区间"、"按涨幅排序"、"取前 20 只"、"剔除 ST"
- 用户意图是"找股票列表",而不是生成单只股票量化图,也不是诊断单只股票行情

不要误判为自然语言 AI 搜股的场景:
- 纯股票名称或代码:如 `平安银行`、`000001`
- 明确包含"行情"并指向单只股票诊断:如 `平安银行行情`
- 明确要求查询"涨停股"、"今日涨停股票"、"今天涨停股有哪些"
- 仅要求连接实时监控、订阅监控信号

## 凭证持久化(config.json,必读)

本 Skill 目录下与本文件同级的 `config.json` 中设有对象 **`openclawCredentials`**,包含三个字符串字段:

| 字段 | 是否必填 | 用途 |
|------|----------|------|
| **`user_id`** | **必填** | 所有接口的用户标识 |
| **`openClaw_api_key`** | **必填** | 量化图、行情问答、自然语言搜股、涨停股、`rating-changes-to-await` 等 **HTTP** 鉴权;调用接口时请求体/Query 里参数名仍为 **`apikey`**,取值必须为本字段 |
| **`monitor_api_key`** | **选填** | **仅** WebSocket 实时监控:`/ws/monitor/open?apikey=...` 中的 `apikey` 须填会员中心「监控信号」Key,即本字段。若用户不需要实时监控,**可不设置**(留空字符串即可) |

### 读取顺序(每次调用前执行)

1. **读取** `config.json` 的 `openclawCredentials.user_id`、`openClaw_api_key`、`monitor_api_key`(仅含空格的字符串视为未配置)。
2. **若用户在当轮对话中提供了新凭证**(粘贴 key、更换账号等),以当轮值为准,并**写回** `config.json`(见「写回规则」)。
3. **合并**:文件中的非空值为默认;当轮用户输入覆盖对应字段。
4. **HTTP 能力**(规则 1~4 及 `rating-changes-to-await`):合并后 **`user_id` 与 `openClaw_api_key` 均须为有效 12 位字母数字**,方可请求;满足后**不得**再索要这两项。
5. **WebSocket 实时监控**(规则 5):除 `user_id` 外,还须 **`monitor_api_key` 有效**;若用户要连监控但该字段空,**单独提示**其到会员中心「开放API」→「监控信号」保存 Key,**不要**与 OpenClaw Key 混淆。
6. **强约束(防重复索要)**:只要 `user_id` + `openClaw_api_key` 已有效,调用 HTTP 接口时**禁止**以新会话、换话题等理由再次索要;`monitor_api_key` 同理——仅在用户要连 WS 且该字段缺失/无效时再提示。

### 写回规则(持久保存)

- 首次凑齐必填项或用户主动更新任一字段后,将当前合并结果**写回** `config.json` 的 `openclawCredentials`(`user_id`、`openClaw_api_key`、`monitor_api_key` 按需更新),**保留**其余顶层键不变;合法 JSON,勿写多余注释。
- 后续会话**优先读文件**。

### 用户修改凭证

1. **对话中修改**:用户粘贴新 Key 或新 `user_id` 时,覆盖对应字段并写回 `config.json`;未提及的字段保留原 config。
2. **手动编辑 `config.json`**:下次执行须以文件为准,勿因对话未出现而重复索要。

### HTTP 与 URL 中的 `apikey` 名对照(避免搞混)

- **POST/GET 的 JSON 或 Query 参数名**统一叫 **`apikey`**,其值 = 合并后的 **`openClaw_api_key`**。
- **WebSocket** URL 查询参数名也叫 **`apikey`**,其值 = 合并后的 **`monitor_api_key`**(与 HTTP 不是同一把 Key 时两者不同)。

### 仍缺必填凭证时的提示(user_id / openClaw_api_key)

仅在 **`user_id` 或 `openClaw_api_key` 缺失或非法

_meta.json

{
  "ownerId": "kn75h9xmh18616a0mkr69wwhz982n7ry",
  "slug": "stockclaw-yingyan",
  "version": "1.1.4",
  "publishedAt": 1774759265242
}

examples.md

# Examples

## 0. `openclawCredentials`:从 config.json 读取与持久化

`config.json` → `openclawCredentials` 含 **`user_id`**、**`openClaw_api_key`**、**`monitor_api_key`**。

- **`user_id` + `openClaw_api_key`**:**必填**,用于所有需鉴权的 **HTTP** 接口(请求里参数名仍为 `apikey`,取值用 `openClaw_api_key`)。
- **`monitor_api_key`**:**选填**;仅 **WebSocket 实时监控** 需要。不需要监控可留空。

场景:用户想用量化图、行情、搜股、涨停等,但对话里未粘贴凭证。

OpenClaw 应:
1. **先读** `openclawCredentials.user_id` 与 `openClaw_api_key`;二者均有效则用于 HTTP,**不要**重复询问。
2. 若用户本轮提供了新值:合并后**写回** `config.json`(保留其他键)。
3. 仍缺 **`user_id` 或 `openClaw_api_key`** 时,提示补充(见 SKILL.md 必填提示);**不要**要求用户必须填 `monitor_api_key`,除非用户要连监控。

示例提示(仅缺必填项时):

```text
继续之前需要配置 user_id 与 openClaw_api_key(HTTP 请求里的 apikey 填后者)。

获取:鹰眼量化「用户中心」→「开放 API」https://yingyan.chatface.com/

保存到本 Skill 的 config.json(openclawCredentials)后可自动沿用。
```

## 0b. 用户要修改或更换凭证

场景:用户说换 Key、换账号、粘贴新的 12 位 Key 等。

处理:
1. 用新值覆盖 `user_id` / `openClaw_api_key` / `monitor_api_key` 中用户明确要改的项,其余保留 config 原值。
2. 可选:用 `user_id` + `openClaw_api_key` 调用 `POST /api/openclaw/stock/message` 做 HTTP 侧验证。
3. **写回** `openclawCredentials` 到 `config.json`。
4. 告知已保存;配置有效时勿重复索要。

用户**手动编辑** `config.json` 后:下次执行**必须先读文件**,以文件为准。

## 1. 用户发送自然语言选股条件

请求:

```http
POST /api/openclaw/stock/query
Content-Type: application/json

{
  "query": "涨幅超过8%的半导体股票,按换手率从高到低排序,取前20只",
  "user_id": "68b26718213929ab1d78aae5",
  "apikey": "YOUR_OPENCLAW_12_CHAR_KEY"
}
```

预期:
- 返回 `intent=stock_query`
- 最多返回 20 条股票记录
- 只返回固定字段,不返回网页端那种大字段全集
- 适合在 OpenClaw 对话中直接渲染成精简表格

## 2. 用户只发股票代码

请求:

```http
POST /api/openclaw/stock/message
Content-Type: application/json

{
  "message": "000001",
  "user_id": "68b267182139",
  "apikey": "YOUR_OPENCLAW_12_CHAR_KEY"
}
```

预期:
- 返回 `intent=chart`
- 读取 `render_markdown`
- 将量化图 markdown 直接渲染到聊天界面

## 3. 用户只发股票名称

请求:

```http
POST /api/openclaw/stock/message
Content-Type: application/json

{
  "message": "平安银行",
  "user_id": "68b26718213929",
  "apikey": "YOUR_OPENCLAW_12_CHAR_KEY"
}
```

预期:
- 返回 `intent=chart`
- 读取 `render_markdown`

## 4. 用户发送"股票+行情"

请求:

```http
POST /api/openclaw/stock/message
Content-Type: application/json

{
  "message": "平安银行行情",
  "user_id": "68b267182139",
  "apikey": "YOUR_OPENCLAW_12_CHAR_KEY"
}
```

预期:
- 返回 `intent=market_query`
- 返回 `stock_context`(TDX 截面数据结构化信息)
- 返回 `system_prompt` 和 `user_prompt`
- OpenClaw 大模型使用 `system_prompt` 作为系统角色、`user_prompt` 作为用户消息,生成趋势诊断并返回给用户

## 5. 股票匹配到多个候选

请求:

```http
POST /api/openclaw/stock/message
Content-Type: application/json

{
  "message": "平安行情",
  "user_id": "68b267182139",
  "apikey": "YOUR_OPENCLAW_12_CHAR_KEY"
}
```

预期:
- 返回 `ok=false`
- `error.code=multiple`
- 提示用户从 `error.candidates` 中选择更精确的股票

## 6. 获取实时监控接入信息

请求:

```http
GET /api/openclaw/stock/monitor/stream?user_id=68b2671
```

预期:
- 返回 `ws_url_template`
- 将模板中 **`apikey` 占位** 填为 **`monitor_api_key`**(监控信号 Key),`user_id` 填

reference.md

# API Reference

## 企业微信专用接口(`/api/wecom`)

企业微信 API 插件鉴权方式与 OpenClaw 不同,需使用 Header/Query 传递 `X-API-Key` 与 `userid`。详见 `job/wechat_enterprise/README.md`。

- `GET /api/wecom/health`:健康检查
- `POST /api/wecom/stock/message`:股票消息(Header: `X-API-Key`, `X-User-Id`;Body: `message` / `query` / `content`)
- `POST /api/wecom/stock/query`:自然语言搜股(Header: `X-API-Key`, `X-User-Id`;Body: `message` / `query` / `content`)
- `GET /api/wecom/stock/limit-up`:涨停股专用查询(Header/Query: `X-API-Key`, `X-User-Id` / `userid`)
- `GET /api/wecom/stock/monitor/stream`:实时监控流模板(Header/Query: `X-API-Key`, `X-User-Id` / `userid`)

---

## `GET /api/openclaw/health`

用于健康检查与快速发现接口入口。

### 响应示例

```json
{
  "ok": true,
  "service": "stockClaw-yingyan",
  "platform_hint": "ClawHub",
  "base_url": "https://yingyan.chatface.com",
  "endpoints": {
    "message": "https://yingyan.chatface.com/api/openclaw/stock/message"
  },
  "demo_page": "https://yingyan.chatface.com/web/openclaw_demo.html"
}
```

## `POST /api/openclaw/stock/message`

统一入口,根据用户消息自动判断是生成量化图还是返回行情数据。

### 请求体

```json
{
  "message": "000001",
  "user_id": "your_user_id",
  "apikey": "YOUR_OPENCLAW_12_CHAR_KEY",
  "start_date": "2025-03-01",
  "end_date": "2026-03-01",
  "initial_capital": 1000000
}
```

### 识别规则
- 仅股票名称或股票代码:`intent=chart`
- 包含"行情"关键词:`intent=market_query`
- 其他输入:`ok=false` 且 `error.code=invalid_message`

### 鉴权要求
- 必须传 `user_id`
- 必须传 `apikey`(**HTTP 参数名**;取值须为会员中心 **OpenClaw** 卡片保存的 12 位 Key,即 `config.json` 的 `openclawCredentials.openClaw_api_key`)
- 图表服务已使用 `Agg` 后端,适合服务端无界面部署

### 缺失 `user_id` 或 OpenClaw Key 时
- OpenClaw 不应在缺少 `user_id` 或有效 **`openClaw_api_key`**(请求里仍放在字段 `apikey`)的情况下直接请求本接口。
- **优先**从本 Skill 同目录 `config.json` 的 `openclawCredentials` 读取 `user_id`、`openClaw_api_key`;二者均有效则用于请求体中的 `user_id` 与 `apikey`。
- **监控 WebSocket** 使用另一字段 `monitor_api_key`,见下文 monitor/stream 与 SKILL.md;不需要监控可不配置 `monitor_api_key`。
- 用户在本轮对话中提供或更新凭证时,将最终值**写回** `openclawCredentials`,保留文件内其他键。
- 获取路径:鹰眼量化「用户中心」→「开放 API」`https://yingyan.chatface.com/`

建议提示文案(缺必填项时):

```text
继续之前需要 user_id 与 openClaw_api_key(请求里 apikey 填该值)。
在鹰眼量化「用户中心」→「开放 API」获取;提供后写入 config.json 的 openclawCredentials。
```

### 用户修改凭证
- **对话**:用户粘贴新 Key/`user_id` 时,用新值调用接口并写回 `openclawCredentials`(含 `openClaw_api_key`、`monitor_api_key` 等被更新的字段)。
- **文件**:用户直接编辑 `config.json` 后,OpenClaw 须以文件为准读取。
- **禁止**:`user_id` 与 `openClaw_api_key` 已有效时,不得无故重复索要。

### 成功响应示例:量化图

```json
{
  "ok": true,
  "intent": "chart",
  "message": "平安银行",
  "stock_query": "平安银行",
  "image_url": "https://yingyan.chatface.com/chart_img/abcd1234.png",
  "image_path": "/chart_img/abcd1234.png",
  "render_markdown": "## 量化图\n- 标的:`平安银行`\n- 图片地址:https://yingyan.chatface.com/chart_img/abcd1234.png\n\n![平安银行 量化图](https://yingyan.chatface.com/chart_img/abcd1234.png)"
}
```

### 成功响应示例:行情问答

```json
{
  "ok": true,
  "intent": "market_query",
  "message": "平安银行行情",
  "stock_query": "

skill-card.md

## Description:

stockClaw-yingyan helps agents use OpenClaw stock APIs to return quantitative chart links, A-share market analysis, natural-language stock screening results, limit-up stock lists, and WebSocket monitor signal updates.

This skill is ready for commercial/non-commercial use.

## Publisher:

[woshixihongtu-cyber](https://clawhub.ai/user/woshixihongtu-cyber)

### License/Terms of Use:

MIT-0

## Use Case:

External ClawHub users and developers use this skill to connect an agent to Yingyan/OpenClaw stock endpoints for chart generation, market Q&A, natural-language stock screening, limit-up stock lists, and real-time monitor signals. It requires user-provided OpenClaw credentials for HTTP requests and a separate monitor key for WebSocket subscriptions.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: API keys are stored in local config.json and may be exposed if the file is committed, uploaded, or shared.

Mitigation: Use limited or disposable keys where possible, keep config.json private after credentials are added, and avoid sharing logs that include keys or full WebSocket URLs.

Risk: Some market analysis prompt content may be supplied by the remote service.

Mitigation: Review the skill before installation and independently verify stock analysis; present outputs as non-advisory analysis rather than investment instructions.

Risk: WebSocket monitoring uses a separate monitor API key that can be confused with the HTTP OpenClaw key.

Mitigation: Keep HTTP and monitor credentials separate, validate the intended key before connecting, and avoid exposing full monitor URLs.

## Reference(s):

- [ClawHub Skill Page](https://clawhub.ai/woshixihongtu-cyber/skills/stockclaw-yingyan)
- [API Reference](artifact/reference.md)
- [Examples](artifact/examples.md)
- [OpenAPI Specification](artifact/openapi.json)
- [Yingyan OpenClaw Service](https://yingyan.chatface.com/)
- [OpenClaw Demo Page](https://yingyan.chatface.com/web/openclaw_demo.html)

## Skill Output:

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

**Output Format:** [Markdown and structured JSON-derived text]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [May include image URLs or rendered Markdown, stock tables, market analysis sections, credential setup prompts, and real-time signal summaries.]

## Skill Version(s):

1.1.4 (source: server release metadata and artifact manifest)

## 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 stockClaw-yingyan 股票量化助手,可以获取个股择时量化图,个股行情分析,AI搜索特定股票,监控股买卖点变化通知。 and adjacent AI workflows.