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.
Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.
SkillHub CLI
skillhub install coderwpf/xtdataInspect the source and compatibility requirements, then follow its installation steps.
Give your agent the source link and ask it to inspect instructions and dependencies before explaining the installation steps.
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)...
These signals come from indexed source analysis and may lag behind changes. Check the current source files.
# 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...