当前位置: 首页 > Skill >

Cn Security Code Resolver Openclaw Skill

Cn Security Code Resolver Openclaw Skill

Cn Security Code Resolver Openclaw Skill

将A股、ETF、基金等中国大陆证券的中文名称通过东方财富搜索转换为交易代码。此技能可实现...

1.0.0 2026.11.27 837
获取Skill文件查看使用说明
作 者:许景 许可证: 更新时间:2026.11.27
本文目录展开

CN Security Code Resolver

Overview

Resolve Chinese security names into exchange-tradable codes with a deterministic first pass and a verifiable fallback. Use the bundled script to query Eastmoney's public suggest API, then return the best match with enough metadata for confirmation.

When to use

Use this skill when the task involves any of the following:

  • Find the code for a Chinese stock, ETF, LOF, REIT, or fund from its Chinese name
  • Convert a portfolio/watchlist from names into tradable codes
  • Confirm whether an instrument is A-share, ETF/fund, or another mainland market type
  • Add exchange-aware identifiers such as 600938.SH, 510880.SH, or Eastmoney QuoteID

Do not use this skill for:

  • Real-time pricing or chart analysis
  • Hong Kong, US, futures, or crypto symbols unless the user explicitly wants cross-market results
  • Fundamental analysis beyond basic instrument identification

Workflow

1) Prefer the script first

Run the bundled resolver script:

python3 skills/cn-security-code-resolver/scripts/resolve_cn_security.py "中国海油"

Batch mode:

python3 skills/cn-security-code-resolver/scripts/resolve_cn_security.py "红利ETF华泰柏瑞" "苏美达" "中国海油" "海油发展" "中海油服"

2) Read the best match carefully

Prefer rows where:

  • Name exactly matches the queried Chinese name
  • SecurityTypeName matches user intent (沪A, 深A, 基金, etc.)
  • MarketType / QuoteID indicate mainland trading venue

For mainland cash equities and ETFs, map exchange suffixes as:

  • codes starting with 6, 5, or 9 → usually SH
  • codes starting with 0, 1, 2, or 3 → usually SZ

If the returned result is ambiguous, show the top 3 candidates and ask for confirmation instead of guessing.

3) Return a concise confirmation

Use this output shape when replying:

标的:中海油服
A股代码:601808
交易所:上交所
类型:沪A
标准代码:601808.SH
QuoteID:1.601808

4) When updating files

When writing portfolio JSON or other structured files, prefer storing both:

  • code: raw numeric code, e.g. 601808
  • exchangeSuffix: SH or SZ when it can be derived confidently

Optional enriched fields:

  • quoteId
  • securityTypeName
  • marketType
  • source: "eastmoney_suggest"

Verification guidance

If the first result looks suspicious:

  • Re-run with the exact full Chinese name from the broker/app
  • Inspect the top candidate list from the script
  • Cross-check with a browser search only when necessary

Good verification signals:

  • Exact Chinese name match
  • Expected category (for example ETF vs stock)
  • Price range and portfolio context are consistent with the instrument type

Bundled resources

Script

  • scripts/resolve_cn_security.py
    • Queries Eastmoney suggest API
    • Supports one or many names
    • Returns ranked JSON results with exchange hints

Reference

  • references/eastmoney-api.md
    • Documents the API endpoint, returned fields, and matching heuristics

Examples

python3 skills/cn-security-code-resolver/scripts/resolve_cn_security.py "苏美达"

Expected top result:

  • 600710 / 苏美达 / 沪A
python3 skills/cn-security-code-resolver/scripts/resolve_cn_security.py "红利ETF华泰柏瑞"

Expected top result:

  • 510880 / 红利ETF华泰柏瑞 / 基金
python3 skills/cn-security-code-resolver/scripts/resolve_cn_security.py "中海油服"

Expected top result:

  • 601808 / 中海油服 / 沪A
  • If other markets also appear elsewhere, prefer A-share unless the user asks otherwise

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,035
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,031
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,019
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,017
OpenAI的Jalapeno芯片未落地,教你分辨300兆瓦算力消息

OpenAI计划在SB Energy租赁的数据中心部署约300兆瓦自研Jalapeno推理芯片,但目前双方仍处于洽谈阶段,交易细节与上线时间表均未公布。本文带你按报道原文核实项目所处阶段,厘清芯片发布、电力功率与实际推理算力的边界,并将融资意向与签约、开工、投运节点分开追踪,避免误将规划容量计入现有算力。

2026.12.02 1,014
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,014
Skill 文件
  • SKILL.md
    • CN Security Code Resolver
    • Overview
    • When to use
    • Workflow
      • 1) Prefer the script first
      • 2) Read the best match carefully
      • 3) Return a concise confirmation
      • 4) When updating files
    • Verification guidance
    • Bundled resources
      • Script
      • Reference
    • Examples
  • 项目或源文件

相关 Skill

更多
agent-id.io agent-id.io OpenClaw skill for the agent-id.io identity and trust service. Use it to register an AI agent, authenticate with challenge/response, manage passkeys and cryp...
Openclaw Skill M365 Task Manager Openclaw Skill M365 Task Manager 使用 Microsoft To Do 与 Planner 管理轻量级 Microsoft 365 任务工作流,适用于需要快速创建、分配、跟踪并跟进操作的场景。
OpenClaw Skill: Obsidian Markdown to Cloudflare Pages OpenClaw Skill: Obsidian Markdown to Cloudflare Pages 将选定的 Obsidian 笔记发布为静态站点并部署到 Cloudflare Pages。
Notebooklm Notebooklm OpenClaw Skill,基于 Google NotebookLM 的非官方 Python API,支持内容生成(播客、视频、幻灯片、测验、思维导图等)、文档管理和研究自动化。当用户需要生成音频概述、视频、学习材料或管理知识库时触发。
Huo15 Karpathy Guidelines Huo15 Karpathy Guidelines 将 Andrej Karpathy 的 LLM 编程四大行为规范封装成 OpenClaw Skill