본문으로 건너뛰기
cccskills
무료GitHub에 공개

mootdx

Provides guidance for retrieving China A-share prices and trading volumes through the TDX protocol. The source is currently retired from automatic routing because servers stopped responding, with explicit selection retained for possible future recovery.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

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.

설치 방법 보기

이럴 때 유용합니다

  • Reviewing the retired data source and its limitations
  • Checking daily and intraday data retrieval methods
  • Understanding ticker formats and output columns
  • Reviewing settings for explicit source selection

포함된 파일(1)

  • SKILL.md4.7 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

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

MethodUseReturns
get_k_data(code, start_date, end_date)Daily OHLCV with date range[open, close, high, low, vol, amount, date, code]
bars(symbol, frequency, offset=800)Intraday / weekly / monthly[open, close, high, low, vol, amount, datetime, volume, ...]
minute(symbol)Current trading day 1m barsSame schema as bars()
quotes(symbol)Real-time L1 snapshot{price, bid, ask, volume, ...}
stocks(market)List all tickers on an exchangeDataFrame of code/name
F10(symbol) / finance(symbol)Fundamentals snapshotHeterogeneous dict

Symbol Format

  • Pure 6-digit: "000001", "600519", "835174" — mootdx auto-detects exchange from prefix:
    • 60x / 68x → SH
    • 00x / 30x / 002 / 003 → SZ
    • 4x / 8x → BJ
  • The built-in loader also accepts "000001.SZ", "600519.SH", "835174.BJ" and strips the suffix.

Column Names

get_k_data() returns lowercase English: open / close / high / low / vol / amount / date / code. The built-in loader renames vol → volume to match the project's OHLCV contract.

bars() returns the same OHLC columns plus a duplicate volume (alongside the legacy vol), a datetime string column, and decomposed year / month / day / hour / minute columns.

Built-in Loader

backtest/loaders/mootdx_loader.py is registered as the mootdx source. Fallback chain for a_share is [tushare, mootdx, akshare] — tushare wins when a token is present; mootdx wins when no token but TCP egress works; akshare is the broadest fallback.

from backtest.runner import run
result = run(strategy=..., source="mootdx")  # explicit override

Known Limitations

LimitationWorkaround
北交所 (BJ): get_k_data raises KeyError, bars() returns empty (upstream missing data)Loader logs a warning and skips BJ symbols — use akshare or tushare
Extended market (futures/options) returns empty as of v0.11.7 (upstream issue)Use tushare/akshare for futures
Each bars() page is 800 rows; loader paginates back up to 25 pages (≈10y daily / ≈5y 1H / ≈3mo 1m)For longer 1m history use tushare minute bars
Server selection has cold-start latency (first call picks the fastest server)First call may be ~2s slower
Returns data in 前复权 by default — no API parameter for 不复权Use tushare/akshare if raw prices are required

Reference Docs

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Compare a Chinese company's US depositary receipts, Hong Kong shares, and mainland shares after adjusting for exchange rates and share ratios. Analyze pricing gaps, valuation differences, and delisting risks to support research into its different listings.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Compare A-share and H-share pricing gaps
  • Measure ADR premiums against Hong Kong shares
  • Review US delisting risks and Hong Kong listing alternatives
HKUDS/Vibe-Trading3.6만2026년 10월 21일 업데이트

akshare

무료

Retrieve stock prices, futures quotes, exchange rates, and economic indicators with the free Python library AKShare. The skill explains market-specific functions, symbol formats, and data preparation for analysis and testing strategies against historical data.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Retrieve historical prices for Chinese, US, and Hong Kong stocks
  • Collect Chinese GDP and consumer price data
  • Check futures quotes and foreign exchange rates
HKUDS/Vibe-Trading3.6만2026년 10월 21일 업데이트

alpha-zoo

무료

Explore bundled libraries of investment factors, signals used to compare securities, and inspect individual formulas and metadata. Evaluate a factor or an entire library across a chosen universe and period, producing aggregate performance statistics and an HTML report.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Find bundled momentum or reversal factors
  • Inspect a named factor's formula and metadata
  • Compare a factor library across a chosen universe and period
HKUDS/Vibe-Trading3.6만2026년 10월 21일 업데이트

Assess whether a Chinese A-share company may receive ST or *ST risk warnings next financial year. Review financial forecasts, dividends, audit opinions, and regulatory penalties, then report risk severity separately from confidence in the prediction.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Reviewing a Chinese A-share company's future ST risk
  • Assessing escalation risk for an existing ST or *ST stock
  • Checking revenue, equity, and dividend warning signs
HKUDS/Vibe-Trading3.6만2026년 10월 21일 업데이트

Plan portfolio allocations across assets using risk, correlations, return forecasts, and trading costs. Compare five optimization methods, produce settings for config.json, and define rebalancing rules that adjust holdings back toward their target weights.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Comparing allocations across stocks, bonds, and gold
  • Choosing an optimizer based on return forecasts and correlations
  • Preparing portfolio settings for config.json
HKUDS/Vibe-Trading3.6만2026년 10월 21일 업데이트

Diagnose failed or abnormal backtests, which test trading strategies on historical data. Inspect result files, strategy code, and configuration to identify bugs, make targeted repairs, rerun tests, and verify the updated metrics.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Investigating backtest execution errors
  • Finding why a strategy produces no trades
  • Checking delayed trades or low capital usage
HKUDS/Vibe-Trading3.6만2026년 10월 21일 업데이트

HKUDS의 스킬 모두 보기

이 스킬의 문제 신고