Huachuang Morphology Api logo

Huachuang Morphology Api

Community
hgsz2003
huachuang-morphology-api

调用华创金工形态学 HTTP API(基础形态、择时截面/历史、ETF 信号与中间数据等)。在用户询问形态学、择时信号、ETF 截面/历史、指数中间数据或需拉取 mark.hcquant.com / xingtai.pro 数据时使用;通过运行 scripts 目录下 CLI 并读取 scripts/config.json 中的 token 完成请求。

Overview

Publisherhgsz2003
Repositoryhuachuang-morphology-skills
Skill namehuachuang-morphology-api
Stars
63
Forks
7
Bundled files
7
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 7 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by hgsz2003 on GitHub. Read the source before you install it.

Installation

Install the Huachuang Morphology Api AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/hgsz2003/huachuang-morphology-skills/tree/main
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/hgsz2003/huachuang-morphology-skills.git \
  .claude/skills/huachuang-morphology-api
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Huachuang Morphology Api in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Huachuang Morphology Api on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Huachuang Morphology Api is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

华创金工形态学 API(OpenClaw / Agent Skill)

前置条件

  1. Python 3.8+,安装依赖:

    bash
    pip install -r scripts/requirements.txt
  2. Token 配置(必填):在 skill 目录下的 scripts/config.json 中存放密钥(勿提交版本库)。

    • 复制 scripts/config.example.json 为 scripts/config.json
    • 将 token 字段改为有效 API Token
    json
    {
      "token": "你的真实Token"
    }

调用方式

在 skill 根目录(本文件所在目录)执行:

bash
python scripts/morphology_cli.py <方法名> '[可选:JSON参数字符串]'
  • 成功时 stdout 为 JSON:ok: true,type 为 dataframe / dict / text / json,数据在 data 字段(DataFrame 为行对象数组)。
  • 失败时 ok: false,error 说明原因;部分错误信息在 stderr。

列出全部可调用方法:

bash
python scripts/morphology_cli.py --list

参数说明

第二个参数为 JSON 对象,键名须与 Python 方法参数一致,仅支持的键会被传入(多余键忽略)。

示例:

bash
python scripts/morphology_cli.py get_basic_info
python scripts/morphology_cli.py get_historical_data '{"win_rate":0.6,"trade_date":"2024-01-02","position":"负面"}'
python scripts/morphology_cli.py get_index_median_data '{"sid":"000300.SH"}'
python scripts/morphology_cli.py get_etf_cross_section_signal '{"company":"fg"}'

方法速查(与 morphology_api.py 一致)

方法作用
get_basic_info全部形态文字介绍
get_supported_assets系统支持的资产
get_latest_daily_stats全部资产最新日统计
get_historical_data历史数据(参数:win_rate, trade_date, position)
get_broad_index_timing宽基指数最新截面信号
get_industry_timing行业指数最新截面信号
get_style_timing风格指数最新截面信号
get_concept_timing概念指数最新截面信号
get_historical_broad_timing宽基历史择时(asset_code)
get_historical_industry_timing行业历史择时(asset_code)
get_historical_style_timing风格历史择时(asset_code)
get_historical_concept_timing概念历史择时(asset_code)
get_etf_cross_section_signalETF 截面信号(company 如 fg/th/bs)
get_etf_historical_signalETF 历史信号(asset_code, company)
evaluate_etf_performanceETF 信号绩效(需 empyrical,asset_code)
get_realtime_historical_data实时历史纯信号(trade_date)
get_index_median_data指数中间数据(sid,港股含 HI 走港股接口)
get_etf_median_dataETF 中间数据(company, sid)
get_etf_portal_dataETF 门户 JSON(sid)
get_etf_scores最新 ETF 得分

常用公司代码 company:fg 富国、th 天弘、bs 博时、htbr 华泰柏瑞等(完整映射见 morphology_api.py 中 asset_codes['companies'])。

Agent 执行约定

  1. 先确认 scripts/config.json 存在且含有效 token;若缺失,提示用户复制 config.example.json 并填写。
  2. 需要表格数据时优先调用 CLI,用返回的 JSON 回答用户,必要时对 data 做摘要或筛选。
  3. evaluate_etf_performance 未安装 empyrical 时会失败,可先 pip install empyrical 或换用其他接口。

脚本说明

  • scripts/morphology_api.py:API 客户端实现。
  • scripts/morphology_cli.py:命令行入口,读取 scripts/config.json。
  • scripts/config.example.json:配置模板。
  • scripts/requirements.txt:Python 依赖。

接口文档

HTTP 路径、Query 参数、返回值类型与 CLI 信封格式见 接口说明.md。

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Huachuang Morphology Api AI skill do?

调用华创金工形态学 HTTP API(基础形态、择时截面/历史、ETF 信号与中间数据等)。在用户询问形态学、择时信号、ETF 截面/历史、指数中间数据或需拉取 mark.hcquant.com / xingtai.pro 数据时使用;通过运行 scripts 目录下 CLI 并读取 scripts/config.json 中的 token 完成请求。

Why use Huachuang Morphology Api on TypingMind?

Because you install it once and use it with any model. Huachuang Morphology Api is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Huachuang Morphology Api in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/hgsz2003/huachuang-morphology-skills/tree/main. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Huachuang Morphology Api?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Huachuang Morphology Api?

As many as you like. As long as a model supports skills, you can use Huachuang Morphology Api with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Huachuang Morphology Api AI skill free?

It is published on GitHub by hgsz2003. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇