# Send Stock Price Query to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "stock-price-query",
    "name": "Stock Price Query",
    "source": "tencent",
    "type": "skill",
    "category": "数据分析",
    "sourceUrl": "https://clawhub.ai/tjefferson/stock-price-query",
    "canonicalUrl": "https://clawhub.ai/tjefferson/stock-price-query",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/stock-price-query",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=stock-price-query",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "references/api-docs.md",
      "scripts/stock_query.py"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-23T16:43:11.935Z",
      "expiresAt": "2026-04-30T16:43:11.935Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
        "contentDisposition": "attachment; filename=\"4claw-imageboard-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/stock-price-query"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/stock-price-query",
    "downloadUrl": "https://openagent3.xyz/downloads/stock-price-query",
    "agentUrl": "https://openagent3.xyz/skills/stock-price-query/agent",
    "manifestUrl": "https://openagent3.xyz/skills/stock-price-query/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/stock-price-query/agent.md"
  }
}
```
## Documentation

### Stock Price Query Skill

实时股票行情查询技能，覆盖 A 股（沪深两市）、港股、美股三大市场。轻量无依赖，无需 API Key，适合聊天场景下的快速股价查询——秒级获取当前价格、涨跌幅、开高低收、成交量等行情数据。

Real-time stock quote tool covering A-shares, Hong Kong, and US stocks. Quick chat-friendly price checks with zero dependencies and no API key needed.

### Overview

实时股票价格查询技能，支持查询 A 股（沪深两市）、港股和美股的实时行情数据。通过调用免费公开的行情 API 获取数据，返回结构化的股票信息。

### When to Use

当用户的请求涉及以下场景时触发此技能：

查询股价："茅台多少钱"、"查一下宁德时代"
了解涨跌："腾讯今天涨了吗"、"00700 行情"
股票代码查询："600519"、"NVDA price"
多只对比："比亚迪和英伟达的股价"
关键词触发："查股票"、"股票行情"、"stock price"

### 查询流程

解析用户输入：从用户消息中提取股票代码。如果用户提供的是中文名称，需先根据下方映射表将名称转换为股票代码（脚本仅接受股票代码作为输入）。
识别市场：根据股票代码格式自动识别所属市场：

A 股沪市：以 sh 开头或 6 位数字以 6 开头（如 sh600519、600519）
A 股深市：以 sz 开头或 6 位数字以 0/3 开头（如 sz000001、300750）
港股：以 hk 开头或纯数字 5 位及以下（如 hk00700、00700）
美股：纯英文字母代码（如 AAPL、TSLA、GOOGL）


执行查询脚本：运行 scripts/stock_query.py 获取实时数据。
格式化输出：将结果以清晰友好的格式展示给用户。

### 脚本调用方式

python3 {{SKILL_DIR}}/scripts/stock_query.py <stock_code> [market]

参数说明：

stock_code（必需）：股票代码，如 600519、AAPL、00700
market（可选）：市场标识，可选值为 sh（沪市）、sz（深市）、hk（港股）、us（美股）。不提供时脚本会自动识别。

输出格式：JSON，包含以下字段：

{
  "code": "600519",
  "name": "贵州茅台",
  "market": "sh",
  "current_price": 1688.00,
  "change": 12.50,
  "change_percent": 0.75,
  "open": 1680.00,
  "high": 1695.00,
  "low": 1675.00,
  "prev_close": 1675.50,
  "volume": 2345678,
  "amount": 3956789012.50,
  "time": "2026-02-24 15:00:00",
  "status": "success"
}

### 常见股票名称与代码映射（供 agent 参考）

脚本仅接受股票代码作为输入，不支持中文名称。当用户提供股票名称时，agent 应先根据下表将名称转换为对应代码后再调用脚本：

名称代码市场贵州茅台600519sh中国平安601318sh比亚迪002594sz宁德时代300750sz腾讯控股00700hk阿里巴巴09988hk苹果/AppleAAPLus特斯拉/TeslaTSLAus英伟达/NVIDIANVDAus微软/MicrosoftMSFTus

对于不在映射表中的股票名称，提示用户提供准确的股票代码。

### 输出格式要求

查询成功后，以如下紧凑格式展示结果（不要使用表格，避免消息过长导致飞书分页）：

📈 **{股票名称}**（{股票代码}.{市场}）

💰 当前价格：{current_price} 元/港元/美元 | 📊 涨跌幅：{change} ({change_percent}%) ↑/↓
📅 行情时间：{time}
📊 今开 {open} | 最高 {high} | 最低 {low} | 昨收 {prev_close}
📦 成交量：{volume} | 成交额：{amount}

涨跌幅为正时使用 ↑，为负时使用 ↓。成交额如果超过 1 亿，用"亿"为单位显示（保留两位小数）；超过 1 万不足 1 亿，用"万"为单位显示。

### Edge Cases

输入安全校验：脚本在执行前会严格校验所有输入参数。stock_code 仅允许字母和数字（正则 ^[A-Za-z0-9]{1,10}$），market 仅允许白名单值（sh/sz/hk/us）。任何包含特殊字符、shell 元字符或超长输入都会被拒绝，防止命令注入。
股票代码无效：返回 "无法识别该股票代码，请确认后重试。支持 A 股（6 位数字）、港股（5 位数字）、美股（英文字母）。"
网络请求失败：返回 "网络请求失败，请稍后重试。"
非交易时段：正常返回最近的收盘数据，并提示 "当前为非交易时段，显示的是最近一次的收盘数据。"
股票名称模糊：脚本不支持名称输入。如果用户提供的名称无法在映射表中匹配，agent 应提示用户提供准确的股票代码。
API 限流：如遇到限流，等待 1 秒后重试一次，仍失败则提示用户稍后再试。
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: tjefferson
- Version: 1.0.7
## Source health
- Status: healthy
- Source download looks usable.
- Yavira can redirect you to the upstream package for this source.
- Health scope: source
- Reason: direct_download_ok
- Checked at: 2026-04-23T16:43:11.935Z
- Expires at: 2026-04-30T16:43:11.935Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/stock-price-query)
- [Send to Agent page](https://openagent3.xyz/skills/stock-price-query/agent)
- [JSON manifest](https://openagent3.xyz/skills/stock-price-query/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/stock-price-query/agent.md)
- [Download page](https://openagent3.xyz/downloads/stock-price-query)