Guide · Agent skill
How to use the Mootdx A-Share Data (Retired) agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
The mootdx skill teaches an AI agent how to fetch historical and intraday price data for Chinese A-shares (Shanghai, Shenzhen and Beijing exchanges) directly from 通达信 (TDX) market data servers using the mootdx Python library. This guide explains what the skill does, how to install it, how to trigger it, and the important limits: its source has been retired from the default data chain. By the end you will know whether it is worth using at all and how to use it safely if you do.
Quick start
- 1Download the ZIP. Download the mootdx skill ZIP from this page.
- 2Unzip into a skills folder. Unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder, or upload the ZIP under Settings, Capabilities, Skills in the Claude apps.
- 3Install mootdx. Run pip install mootdx.
- 4Install the newer httpx. Run pip install 'httpx>=0.28.1' so the rest of the project works.
- 5Ask with source mootdx. Request A-share data and name source="mootdx" explicitly, since the skill is retired from the default chain.
- 6Check results. Verify the returned rows and handle errors or empty data, because the TDX servers may no longer answer.
What the mootdx skill makes the agent do
Agent skills are folders of instructions that an AI assistant loads when a task matches them. This skill, named mootdx and categorised as a data source, shows the agent how to call the mootdx library to read A-share market data over TCP from TDX servers, rather than through HTTP scrapers.
The skill covers daily OHLCV data with a date range, intraday and weekly or monthly bars, a current-day minute view, real-time snapshots, ticker lists and fundamentals. Public market data only; the source says no token, per-IP throttling or captcha is involved.
Important: this source is retired
The skill's status note says TDX servers stopped answering the client protocol mootdx speaks around October 2026 (upstream issue mootdx/mootdx#157). The source is no longer in the automatic A-share fallback and is excluded from the loader-health check. It stays registered only for explicit calls with source="mootdx" in case a future upstream release restores the protocol.
For most A-share OHLCV data, the skill itself recommends tencent, eastmoney or baostock.
Install the mootdx skill
Download the skill ZIP from this page and unzip it into one of these locations: ~/.claude/skills/ for your user account, or .claude/skills/ inside a project folder. Alternatively, in the Claude apps, open Settings, then Capabilities, then Skills, and upload the ZIP.
The skill needs the Python package. Install it with the commands from the source, then run the second install so httpx is current.
- Install mootdx: pip install mootdx
- Install httpx: pip install 'httpx>=0.28.1'
- The source notes mootdx pins httpx<0.26 in setup.py, and the second install restores the modern version that the wider project needs.
pip install mootdx && pip install 'httpx>=0.28.1'Trigger the skill with natural requests
You do not need special syntax. Ask for A-share price data and name mootdx as the source, for example: "Get daily prices for 000001 from January 2025 using the mootdx source." Naming source="mootdx" matters, because the skill is only used on explicit request now.
Symbols can be plain six digits or carry a suffix. The loader strips suffixes such as .SZ, .SH and .BJ.
- Daily data: "Pull 600519 daily OHLCV from 2025-01-01 to 2025-02-01 with source mootdx."
- Intraday: "Get 15-minute bars for 600519 with source mootdx."
Use the core methods and codes
The Quick Start in the source uses Quotes.factory(market="std") and two calls: get_k_data for daily data with start and end dates, and bars for intraday data. bars() has no native date range; it returns the latest rows by offset, and the built-in loader fetches 800 rows then clips to your window.
bars() uses integer frequency codes from mootdx.consts.
- 8 = 1m, 0 = 5m, 1 = 15m, 2 = 30m, 3 = 1H, 4 = 1D, 5 = 1W, 6 = 1M
- get_k_data() is daily only
- Symbol prefixes: 60x and 68x are SH; 00x, 30x, 002 and 003 are SZ; 4x and 8x are BJ
from mootdx.quotes import Quotes
client = Quotes.factory(market="std")
df = client.get_k_data(code="000001", start_date="2025-01-01", end_date="2025-02-01")
df_15m = client.bars(symbol="600519", frequency=1, offset=800)Know the limits before you rely on it
The skill documents several gaps. Beijing exchange (北交所) symbols fail or come back empty upstream, and the loader skips them with a warning. Futures and options return empty as of the version the source cites. Data is forward-adjusted (前复权) with no parameter for unadjusted (不复权) prices, so it is unsuitable for many backtests that need raw prices.
History is capped: the loader pages back up to 25 pages, roughly 10 years of daily data, 5 years of 1H bars or 3 months of 1m bars. The first call may also be about 2 seconds slower while it picks the fastest server.
- Beijing (BJ): use akshare or tushare
- Futures and options: use tushare or akshare
- Long 1m history: use tushare minute bars
- Raw prices: use tushare or akshare
Safety notes: scripts and network access
This skill runs scripts and uses the network. Its code connects over TCP to TDX market data servers, so your machine needs outbound network access to those servers. Read the mootdx code and the loader (backtest/loaders/mootdx_loader.py in the Vibe-Trading repository) before running it on a machine with sensitive data, and install packages in a virtual environment where practical.
- Only install the skill from sources you trust, and review the ZIP contents (the source lists SKILL.md as its file).
- Expect failures or empty results, and have your code check for them rather than assume data is present.
What people use it for
- Reviewing how a legacy A-share loader in the Vibe-Trading codebase was built
- Pulling daily OHLCV for a Shanghai or Shenzhen ticker when you explicitly want mootdx as the source
- Testing intraday bar code against 15-minute or 1H bars for a short recent window
- Maintaining or migrating old data pipelines that referenced the mootdx loader
Frequently asked questions
Is the mootdx skill free to use?
The skill is published under the MIT licence, as listed for this item. The source describes public market data with no token requirement, but that does not guarantee the data is still served.
What do I need to run the mootdx skill?
You need Python, the mootdx package installed with pip, httpx 0.28.1 or newer, and network access to TDX TCP servers. The skill also runs scripts.
Why does mootdx return no data?
The skill states TDX servers stopped answering the protocol mootdx uses around October 2026, so calls may fail or return nothing. The source is no longer in the automatic fallback chain.
Which alternative should I use for A-share data?
The skill recommends tencent, eastmoney or baostock for A-share OHLCV data. The built-in chain also lists tushare and akshare as fallbacks for specific cases such as Beijing symbols.
Can mootdx get Beijing stock prices or futures?
No, according to the source. Beijing exchange symbols fail or return empty upstream, and futures and options return empty in the version cited. Use akshare or tushare instead.
Does mootdx give unadjusted prices for backtests?
No. The source says data is forward-adjusted (前复权) and there is no parameter for unadjusted (不复权) prices. Use tushare or akshare if you need raw prices.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use the mootdx skill only if you maintain the Vibe-Trading codebase, need to support a legacy mootdx loader, or are studying how A-share loaders were built. Anyone who needs reliable live A-share data, Beijing symbols, futures, unadjusted prices or long minute history should choose tencent, eastmoney, baostock, tushare or akshare instead.
Download the skill