Hithink RoyalFlush Financial Data Skill: Unified A-Shares Data Retrieval and Integration Paths for Agents

Introduction

When doing A-share research in an IDE or conversational agent, a common approach is to cobble together ad-hoc curl calls, dig through scattered API docs, or switch back and forth between CLI, MCP, and HTTP. Instruments must first be disambiguated into fully qualified codes with market suffixes, and financials and valuations need alignment on report periods and data scopes; once whole-market or long-window queries come into play, result sizes can easily blow up the context window. Below we introduce the “HiThink Financial Data” Skill on SkillHub (coordinate @org-6602ci5n/hithink-finance): it consolidates task routing, credential conventions, and REST / MCP / CLI contracts of the HiThink financial data service into a single SKILL.md, enabling agents to choose the right path by scenario instead of reinventing the wheel every time.

What Is This

“HiThink Financial Data” is a unified agent entry point to the HiThink financial data service. Published by Zhejiang HiThink Network Technology Co., Ltd., it is categorized as professional on SkillHub. The current version is 1.1.2, and its tags indicate requires_api_key=true (remote data retrieval requires an API key). The skill’s introduction states: it enables querying, analyzing, synchronizing, or exporting data for A-shares, indices, funds, futures, options, and local DuckDB via the HiThink financial data service, and is used to select and configure CLI, MCP, REST API, as well as to execute financial data retrieval tasks. The official GitHub repository is HiThink-Tech/Financial-API; when performing tasks, prefer reading the skill’s built-in docs—no need to clone the repository.

SkillHub page: https://www.skillhub.cn/skills/org-6602ci5n/hithink-finance; API coordinate page: https://api.skillhub.cn/org-6602ci5n/hithink-finance.

Core Capabilities

The skill routes among three primary paths based on user intent, and embeds business contract descriptions for each.

Scenario Preferred Description
Terminals, agent automation, remote-to-local DuckDB integration CLI Package @hithink-tech/hithink-finance-cli, covering command domains such as symbol, market, financials, valuation, index, fund, special, futures, options, and data / db
Current Chat/IDE connected to a managed MCP service MCP Read MCP routing docs by business domain, and conform to the current tools/list and schemas
HTTP, custom languages, or server-side integrations REST API Base URL https://fuyao.aicubes.cn; public data endpoints are GET; authentication header X-api-key

At the data and task level, the skill’s documentation covers: A-share quotes, financial reports, latest valuations, call auctions, index/sector/special data, public funds, public futures/options reference and market data, and local DuckDB sync and export. Execution rules emphasize: when names or codes are not unique, first search and disambiguate to thscode; for A-share historical quotes without an explicit adjustment setting, default to forward (forward-adjusted); for whole-market or long-window results, persist to disk and report only the path and a row-count summary; acceptance is determined by the business envelope (REST/MCP code=0, CLI exit code 0 and JSON ok=true).

The docs also specify capability boundaries: minute K/tick/Level-2, Hong Kong/US equities, fund subscription/redemption, and order execution are not included in the current public access scope; some “client-only” features are provided solely within the HiThink AI client and are not exposed via public REST, MCP, CLI, or Python SDK entry points.

Installation and Activation

Install the Skill on SkillHub

The official page instructs you to install this Skill following SkillHub’s installation guide. First check whether the skillhub CLI is already available:

command -v skillhub && skillhub --version

If it is not installed, you can run the full installation or install only the CLI (see https://skillhub.cn/install/skillhub.md). When installing the skill, you must pass --dir pointing to your agent’s skills directory; otherwise, the default install to ./skills/ may not be recognized.

skillhub install @org-6602ci5n/hithink-finance --dir <skills directory>

Common paths (from SkillHub installation docs):

  • Cursor: ~/.cursor/skills/
  • Claude Code: ~/.claude/skills/
  • Codex: ~/.codex/skills/ or .agents/skills/ in the project

After installation, the agent loads SKILL.md in that directory in a new session and executes tasks according to the built-in references.

Configure the API Key (independent of access method)

All remote access shares the same API key, obtained in the admin console: https://fuyao.aicubes.cn/admin/ (keep the trailing / to avoid losing the scan-based login state due to HTTP downgrade). Recommended order of checks:

  1. Environment variable HITHINK_FINANCE_API_KEY
  2. User-level credentials.env (Linux: ${XDG_CONFIG_HOME:-~/.config}/hithink-finance/credentials.env, with one line inside: HITHINK_FINANCE_API_KEY=...)
  3. Backward compatibility with existing FUYAO_TOKEN, API_KEY, or CLI system credentials

Configuring the API key does not require installing the CLI first; if you choose the CLI path and need to sync system credentials, you can log in via stdin:

printf '%s' "$HITHINK_FINANCE_API_KEY" | \
  hithink-finance auth login --api-key-stdin --format json

Optional: Install hithink-finance CLI

When the task fits the CLI (including local DuckDB) and no command is available on PATH, the skill allows informing the user and then installing. Requirements: Node.js >=22.12.0 and a working npm:

npm install -g @hithink-tech/hithink-finance-cli
hithink-finance version --format json

After installation, verify commands and built-in skill provenance with hithink-finance skills status --format json and capabilities --format json, then proceed with specific data retrieval.

Typical Usage

The following steps come from the skill’s built-in contracts and can be reproduced in your environment.

1. REST: search instruments and validate authentication

Use a minimal request to confirm the key and search endpoint are usable (replace <API_KEY> with your real key; do not commit or log it):

curl 'https://fuyao.aicubes.cn/api/meta/tickers/search?q=600519&limit=1' \
  -H 'X-api-key: <API_KEY>'

Success requires HTTP 200 and response body code == 0; instrument codes must use the full thscode (e.g., 600519.SH)—do not guess exchange suffixes.

2. CLI: check environment and built-in capabilities

hithink-finance version --format json
hithink-finance auth status --format json
hithink-finance skills status --format json
hithink-finance capabilities --format json

When using the CLI to complete financial tasks, conform to the above capabilities and each command’s --help rather than relying solely on the skill overview.

3. Natural language tasks on the agent side

Simply describe the asset class, time window, freshness, and output size to the agent, e.g., “Fetch the income statement metrics for a company for the last four quarters and persist them to CSV.” The skill requires the agent to briefly confirm only when missing information would materially change results; to prefer sufficiently fresh historical OHLCV from the local DuckDB; and, upon remote failure, to report the failing stage and sanitized errors, never passing off static examples as real data.

Use Cases and Considerations

Who it’s for

  • R&D, quant, or data-analysis agents running in clients that support Skills (such as Cursor, Claude Code, Codex) and need a stable way to integrate HiThink A-share and related markets.
  • Teams that want to complete “choose REST / MCP / CLI → read contracts → configure key → retrieve/sync data” within a single conversation, reducing hand-written glue code.

Limitations and pitfalls

  • You must provide your own API key; the skill will not bypass authentication checks with whole-market downloads.
  • The admin console URL must use the HTTPS address with a trailing slash; QR-code login depends on a visible browser window—automation seeing “already open” does not guarantee the user can see the QR code.
  • Do not put keys in command arguments, project files, or Git; if you paste keys in chat, the platform may retain message history.
  • SkillHub installation and the GitHub npx skills update hithink-finance update path are different; for SkillHub installs, the built-in docs correspond to the currently installed package.
  • There is a clear boundary between public APIs and client-only capabilities; if a task hits a client-only feature, switch to the client entry rather than forcing a public API call.

Closing Remarks

The “HiThink Financial Data” Skill consolidates access choices, credential rules, and business contracts for the HiThink financial data service into a single agent-readable document, making it a suitable default playbook for A-share and related instrument data retrieval, synchronization, and analysis. For installation and details, see SkillHub: https://www.skillhub.cn/skills/org-6602ci5n/hithink-finance; coordinate page: https://api.skillhub.cn/org-6602ci5n/hithink-finance.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye