mootdx-china-stock-data
Fetch China A-share stock market data (bars, realtime quotes, tick-by-tick transactions) via mootdx/TDX protocol. Use when working with Chinese stock data, mootdx library, TDX quotes, intraday minute bars, transaction history, or real-time A-share market data.
Why use this skill?
Access real-time China A-share data, K-lines, and transaction history for your OpenClaw AI agent using the mootdx TDX protocol integration.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/wangdinglu/free-a-share-real-time-dataWhat This Skill Does
The mootdx-china-stock-data skill provides a specialized interface for the OpenClaw AI agent to interact with the TDX (TongDaXin) financial data protocol. It enables the agent to retrieve professional-grade market data for China A-shares, including historical and real-time K-line (candlestick) bars, live quotes, and high-frequency tick-by-tick transaction logs. By abstracting the complexities of the mootdx library, this skill allows the agent to perform quantitative analysis, market monitoring, and data extraction for technical trading research seamlessly.
Installation
To integrate this capability, execute the following installation command in your terminal:
clawhub install openclaw/skills/skills/wangdinglu/free-a-share-real-time-data
Ensure you have the required Python environment dependencies installed via pip install mootdx. The agent uses this to interface with TDX gateways, which provide the raw data feeds necessary for accurate market representation.
Use Cases
- Technical Analysis Research: Fetch daily, weekly, or minute-level historical K-lines to calculate moving averages, MACD, or Bollinger bands.
- Real-time Market Monitoring: Query live quotes for specific ticker lists to track performance during active trading hours.
- Transaction Auditing: Analyze deep tick-by-tick data to observe large block trades or institutional accumulation patterns.
- Automated Reporting: Generate end-of-day market summaries for specific portfolios or indices like the Shanghai Composite.
Example Prompts
- "Fetch the 15-minute K-line data for 600300.SH for the last three trading days and calculate the average volume."
- "What is the current real-time quote for the stocks 000001.SZ and 300750.SZ?"
- "Retrieve the transaction history for 688001.SH for today's morning session and identify any trades larger than 500 lots."
Tips & Limitations
- Timezone/Calendar Sensitivity: Always remember that A-share data is only available during Beijing Time (UTC+8) trading hours. The skill includes a patch for
tdxpy.hq.time_frameto prevent connectivity drops on non-Beijing servers, but requests outside of market hours will return empty results. - Code Formatting: The TDX protocol requires pure numeric codes. You must strip the suffixes (e.g., convert
600300.SHto600300). - Unsupported Assets: This skill does not support Beijing Stock Exchange (.BJ) tickers. Ensure your input logic filters these out to avoid runtime errors.
- Performance: While the library is robust, high-frequency querying of tick data can hit rate limits; implement appropriate delays if iterating over large watchlists.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-wangdinglu-free-a-share-real-time-data": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: network-access, code-execution