CN Security Code Resolver for Openclaw

A specialized tool for converting mainland China security names into precise exchange-tradable codes and metadata.

mr-11even
v1.0.0
Mar 24, 2026
0
850
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install cn-security-code-resolver-openclaw-skill

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install cn-security-code-resolver-openclaw-skill using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is CN Security Code Resolver?

The CN Security Code Resolver is a robust utility designed to bridge the gap between Chinese security names and their respective market identifiers. By leveraging the Eastmoney public suggest API, this skill provides a deterministic method for identifying A-share stocks, ETFs, LOFs, REITs, and other mainland China financial instruments. It is an essential component of the Openclaw Skills ecosystem for developers and traders working with mainland market data.

This skill ensures high accuracy by mapping numeric codes to their correct exchange suffixes, such as .SH for Shanghai or .SZ for Shenzhen. It streamlines the process of portfolio enrichment, allowing users to transform a simple list of company or fund names into a structured dataset compatible with professional trading platforms and financial analysis tools.

CN Security Code Resolver Use Cases

  • Converting a watchlist of Chinese company names into a list of tradable ticker symbols.
  • Enriching financial JSON files or portfolio databases with accurate exchange suffixes and QuoteIDs.
  • Distinguishing between stock types, such as identifying if a security is a mainland A-share or a fund/ETF.
  • Verifying the correct security code for an instrument when provided with ambiguous or partial Chinese names.

How CN Security Code Resolver Works

  1. The user provides one or more Chinese security names as input to the Openclaw Skills resolver.
  2. The system executes a bundled Python script that queries the Eastmoney suggest API endpoint.
  3. The script retrieves and ranks results based on name similarity and instrument type.
  4. The resolver applies logic to assign exchange suffixes (SH/SZ) based on the numeric prefix of the security code.
  5. A structured output is returned, including the standard code, market type, and specific QuoteID for verification.

CN Security Code Resolver Setup

To integrate this capability into your environment, ensure you have Python 3 installed and the script directory available within your Openclaw Skills workspace.

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

# Batch resolution for multiple instruments
python3 skills/cn-security-code-resolver/scripts/resolve_cn_security.py "红利ETF" "苏美达" "中国海油"

CN Security Code Resolver Data Schema & Taxonomy

The skill organizes security data into a standardized format. When updating files, the following schema is preferred for consistency within Openclaw Skills:

Field Description Example
code The raw numeric security identifier 601808
exchangeSuffix The market identifier (SH or SZ) SH
standardCode Combined code and suffix 601808.SH
securityType Classification of the instrument 沪A or 基金
quoteId Eastmoney-specific unique ID 1.601808
source Data origin for traceability eastmoney_suggest

CN Security Code Resolver Advanced Features

  • Batch Processing: Resolve multiple security names in a single CLI command to optimize workflow efficiency.
  • Intelligent Suffix Mapping: Automatically derives exchange suffixes based on mainland China's numeric code standards (e.g., codes starting with 6, 5, or 9 mapped to SH).
  • Ambiguity Handling: Identifies and surfaces the top 3 candidates when a query returns multiple potential matches, preventing automated data corruption.
  • Metadata Enrichment: Provides deep integration fields like MarketType and QuoteID for advanced financial automation within Openclaw Skills.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*