humanpages
Search and hire real humans for tasks — photography, delivery, research, and more
XtQuant market data module — real-time quotes, K-lines, tick, Level2, financials for QMT/miniQMT.
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
SkillHub CLI
skillhub install coderwpf/xtdata打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。
将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。
xtdata is the market data module of XtQuant, providing real-time and historical market data via the local miniQMT client.
⚠️ Requires miniQMT running locally. xtdata communicates with miniQMT via TCP to fetch data.
pip install xtquant
from xtquant import xtdata
xtdata.connect() # connects to local miniQMT
Optionally specify data directory:
xtdata.data_dir = r'D:\QMT\userdata_mini'
Must download before accessing local data:
# Download daily K-line
xtdata.download_history_data('000001.SZ', '1d', start_time='20240101', end_time='20240630')
# Download 1-minute K-line
xtdata.download_history_data('000001.SZ', '1m', start_time='20240101', end_time='20240630')
# Download tick data
xtdata.download_history_data('000001.SZ', 'tick', start_time='20240601', end_time='20240630')
# Get market data (returns dict of DataFrames keyed by stock code)
data = xtdata.get_market_data_ex(
[], # field_list, empty = all fields
['000001.SZ'], # stock_list
period='1d', # tick, 1m, 5m, 15m, 30m, 1h, 1d, 1w, 1mon
start_time='20240101',
end_time='20240630',
count=-1, # -1 = all data
dividend_type='front', # none, front, back, front_ratio, back_ratio
fill_data=True
)
df = data['000001.SZ']
# columns: open, high, low, close, volume, amount, settelementPrice, openInterest, preClose, suspendFlag
data = xtdata.get_local_data(
field_list=[],
stock_list=['000001.SZ'],
period='1d',
start_time='20240101',
end_time='20240630'
)
def on_data(datas):
for stock_code, data in datas.items():
print(stock_code, data)...
这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。
# XtData (XtQuant 行情模块)
`xtdata` is the market data module of [XtQuant](http://dict.thinktrader.net/nativeApi/start_now.html), providing real-time and historical market data via the local miniQMT client.
> ⚠️ **Requires miniQMT running locally**. xtdata communicates with miniQMT via TCP to fetch data.
## Install
```bash
pip install xtquant
```
## Connect
```python
from xtquant import xtdata
xtdata.connect() # connects to local miniQMT
```
Optionally specify data directory:
```python
xtdata.data_dir = r'D:\QMT\userdata_mini'
```
---
## Download historical data
Must download before accessing local data:
```python
# Download daily K-line
xtdata.download_history_data('000001.SZ', '1d', start_time='20240101', end_time='20240630')
# Download 1-minute K-line
xtdata.download_history_data('000001.SZ', '1m', start_time='20240101', end_time='20240630')
# Download tick data
xtdata.download_history_data('000001.SZ', 'tick', start_time='20240601', end_time='20240630')
```
## Get K-line data
```python
# Get market data (returns dict of DataFrames keyed by stock code)
data = xtdata.get_market_data_ex(
[], # field_list, empty = all fields
['000001.SZ'], # stock_list
period='1d', # tick, 1m, 5m, 15m, 30m, 1h, 1d, 1w, 1mon
start_time='20240101',
end_time='20240630',
count=-1, # -1 = all data
dividend_type='front', # none, front, back, front_ratio, back_ratio
fill_data=True
)
df = data['000001.SZ']
# columns: open, high, low, close, volume, amount, settelementPrice, openInterest, preClose, suspendFlag
```
## Get local data (no download needed if already cached)
```python
data = xtdata.get_local_data(
field_list=[],
stock_list=['000001.SZ'],
period='1d',
start_time='20240101',
end_time='20240630'
)
```
## Real-time subscription
### Subscribe single stock
```python
def on_data(datas):
for stock_code, data in datas.items():
print(stock_code, data)...Search and hire real humans for tasks — photography, delivery, research, and more
Reusable skill templates for OpenClaw AI agents. Templates for API integration, data processing, web scraping, CLI tools, and file processing.
Query historical crypto market data from 0xArchive across Hyperliquid, Lighter.xyz, and HIP-3. Covers orderbooks, trades, candles, funding rates, open interest, liquidations, and data quality. Use when the user...
Install, configure, and manage 1-SEC — an open-source, all-in-one cybersecurity platform (16 modules, single binary) on Linux servers and VPS instances. Use when the user asks to secure a server, install securi...