xtdata
XtQuant行情数据模块 - 为QMT/miniQMT提供实时行情、K线、Tick、Level2和财务数据。
Why use this skill?
Learn to use the xtdata skill in OpenClaw for real-time market data, historical K-lines, and financial metrics through the miniQMT local client.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/coderwpf/xtdataWhat This Skill Does
The xtdata skill provides a comprehensive interface for the XtQuant library, enabling AI agents to access professional-grade market data directly via a local miniQMT client. It bridges the gap between raw trading infrastructure and intelligent analysis by offering methods to subscribe to real-time market data, retrieve historical K-line data, access Level2 tick data, and fetch fundamental financial metrics. It is the primary data backbone for quantitative analysis tasks performed by OpenClaw agents.
Installation
To use this skill, ensure you have the xtquant Python package installed in your local environment. Run the following command in your terminal:
pip install xtquant
After installation, ensure your miniQMT application is running, as xtdata requires an active TCP connection to this client to function. In your agent configuration, use clawhub install openclaw/skills/skills/coderwpf/xtdata to integrate the skill into your workflow.
Use Cases
This skill is highly versatile for financial agents. Common use cases include:
- Quantitative Research: Fetching long-term historical data for backtesting trading strategies.
- Real-time Monitoring: Subscribing to tick data to trigger instant alerts or automated execution when specific price levels are breached.
- Portfolio Analysis: Retrieving financial reports and fundamental data to assess the valuation and health of specific stocks or sectors.
- Data Aggregation: Building customized datasets by downloading large blocks of historical K-lines for offline analysis and machine learning model training.
Example Prompts
- "Download 1-minute historical data for 600519.SH from January 1st, 2024, to today, and save it for analysis."
- "Subscribe to real-time tick data for 000001.SZ and alert me if the price changes by more than 2%."
- "Get the latest financial report data for 600000.SH to help me calculate its current P/E ratio."
Tips & Limitations
- Two-Step Process: Always remember that you must call
download_history_databefore attempting togetthe data. Data resides in the local cache; failing to download first will result in empty returns. - Rate Limiting: The system is sensitive to excessive concurrent requests. When analyzing large datasets, prioritize batch queries rather than looping through individual stock codes to optimize network performance.
- Dependency: The skill relies entirely on an active local miniQMT process. If the client is closed or the network connection is interrupted, the agent will lose data connectivity. Ensure miniQMT is launched with proper credentials and market permissions (especially for Level2 data).
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-coderwpf-xtdata": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: network-access, file-read, file-write
Related Skills
backtrader
Backtrader 开源量化回测框架 - 支持多数据源、多策略、多周期回测与实盘交易,纯Python实现。
pywencai
同花顺问财自然语言数据查询工具 - 使用中文自然语言查询A股、指数、基金、港美股、可转债等市场数据。
tqsdk
天勤量化TqSdk - 开源Python期货/期权交易SDK,提供实时行情、回测和实盘交易功能。
rqalpha
RQAlpha 米筐开源事件驱动回测框架 - 支持A股和期货,模块化架构,可自由扩展。
baostock
BaoStock 免费A股数据平台 - 支持K线、财务数据、行业分类查询,无需注册即可使用。