AI Agent Hub
Back to skills
AI Zhangle A-Share Paper Trading icon

AI Zhangle A-Share Paper Trading

Professional Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please install @user_d9eea1c5/zhangle-a-share-paper-trading according to https://skillhub.cn/install/skillhub.md.

About this skill

Problem

A common pain point in A-share paper trading is that users may mention a ticker by name, such as “Moutai,” instead of a code, while 000001 can mean different instruments on different exchanges. Before ordering, the caller must verify price, available funds, and sellable quantity. After trading, it must distinguish pending orders, partial fills, and historical trades. Mapping natural language directly to trading APIs can easily miss parameters or misclassify errors.

How It Works

The skill wraps the Huatai Securities AI Zhangle backend CLI: searchStock, getQuote, getAccountBalance, getPositions, submitOrder, cancelOrder, listPendingOrders, and listTradeHistory.
- Resolve tickers: use searchStock first to get the stockCode + exchange pair.
- Check state: use getQuote for price, limit-up/limit-down, and suspension; use account and position endpoints for funds and holdings.
- Execute trading: use submitOrder to place orders and cancelOrder to cancel, then inspect listPendingOrders and listTradeHistory for pending or filled activity.
- Handle errors: branch on error.category, such as auth, validation, business, and network.

Boundaries

It supports A-share paper trading only, not HK, US, futures, FX, or real capital trading. Amounts are in CNY, percentages are percent values, sellable quantity should use availableQuantity, and the integration requires HT_APIKEY and PAPER_TRADING_API_URL.

Use Cases

  • After backtesting, convert natural-language buy or sell intent into A-share paper limit or market orders and verify status.
  • Debug why a simulated position cannot be sold by checking available quantity, daily P&L, and available funds.
  • Review monthly paper trades by date, stock, and direction, then summarize filled amounts and fees.
  • Before ordering, confirm whether the ticker is suspended, its limit prices, and the top bid/ask quotes.

Best For

  • A-share paper-trading developer: resolving names or codes to stockCode+exchange and calling the CLI.
  • Quant strategy intern: validating order, cancellation, and fill-query error categories and edge cases.
  • Broker tooling engineer: integrating quote, account, position, and pending-order endpoints.
  • Trading teaching assistant: demonstrating simulated buy/sell, cancellation, and history queries.