Skills

Mootdx

Mootdx A-share market data via TCP-direct 通达信 servers.

Install

npx skills add HKUDS/Vibe-Trading --skill mootdx -g -a claude-code -y
Repository
HKUDS/Vibe-Trading37.4k
Category
Engineering
Updated
3d ago
License
MIT
Context cost
Lightabout 1,164 tokens
Runs scripts
No, instructions only

What it does

Mootdx A-share market data via TCP-direct 通达信 servers. RETIRED 2026-10, TDX servers stopped answering the client protocol, so this source is out of the automatic fallback chain and kept only for explicit `source="mootdx"` use.

Status (2026-10-08): retired from the default chain. TDX servers stopped answering the client protocol mootdx speaks (upstream: mootdx/mootdx#157), so this source is no longer in the automatic A-share fallback and is excluded from the loader-health canary. The loader stays registered for explicit source="mootdx" calls in case a future upstream release restores the protocol. For A-share OHLCV prefer tencent / eastmoney / baostock.

Overview

Mootdx talks the native 通达信 (TDX) binary protocol over TCP, bypassing the HTTP scrapers that periodically fail under load (akshare → East Money is the canonical example). Public market data only, no token, no per-IP throttling, no captcha.

Mootdx pins httpx<0.26 in setup.py, but only uses basic httpx.Client/get APIs that are forward-compatible. The second pip install restores the modern httpx that the rest of Vibe-Trading (MCP server, fastmcp) needs.

Quick Start

from mootdx.quotes import Quotes

client = Quotes.factory(market="std")  # std = 沪/深/京; ext = 期货/期权 (upstream-broken)

# Daily OHLCV with a date range (preferred API).
df = client.get_k_data(code="000001", start_date="2025-01-01", end_date="2025-02-01")

# Intraday, offset-from-latest only, no native date range.
df_15m = client.bars(symbol="600519", frequency=1, offset=800)

Frequency Codes

bars(frequency=N) uses integer codes from mootdx.consts:

CodeBar
81m
05m
115m
230m
31H
41D
51W
61M

get_k_data() is daily only but accepts start_date / end_date. For intraday, bars() returns the latest N rows, the built-in loader over-fetches offset=800 then clips to the requested window.

Key Methods

Read the whole SKILL.md on GitHub

More in Engineering