快捷量化助手(Quick Quantitative Assistant)- 简洁易用的A股量化交易框架
Project description
qka (快量化)
快捷量化助手(Quick Quantitative Assistant)是一个简洁易用,可实操A股的量化交易框架。
安装
pip install qka
使用方法
QMTServer
from qka.server import QMTServer
server = QMTServer("YOUR_ACCOUNT_ID", "YOUR_QMT_PATH")
# 服务器启动时会打印生成的token
server.start()
QMTClient
查询
from qka.client import QMTClient
client = QMTClient(token="服务器打印的token")
# 调用接口
result = client.api("query_stock_asset")
下单
from qka.client import QMTClient
from xtquant import xtconstant
client = QMTClient(token="服务器打印的token", url="服务端地址")
# 调用接口
result = client.api("order_stock", stock_code='600000.SH', order_type=xtconstant.STOCK_BUY, order_volume =1000, price_type=xtconstant.FIX_PRICE, price=10.5)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
qka-1.0.2.tar.gz
(88.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
qka-1.0.2-py3-none-any.whl
(40.7 kB
view details)
File details
Details for the file qka-1.0.2.tar.gz.
File metadata
- Download URL: qka-1.0.2.tar.gz
- Upload date:
- Size: 88.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a559176acc887e47e51a4e727ea7e27cb2d42158e5bf2d573ede2b24894751f
|
|
| MD5 |
ad5940c50af02f31c693caa334b4123a
|
|
| BLAKE2b-256 |
fdc5b4c17d76b023e20d69cb9978dce66e64be19473425f85548386035b546ae
|
File details
Details for the file qka-1.0.2-py3-none-any.whl.
File metadata
- Download URL: qka-1.0.2-py3-none-any.whl
- Upload date:
- Size: 40.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
acabebdce270873542bbd090e42e80829bc51d88bb2a297688f51429f4dd9d12
|
|
| MD5 |
a095bc5e8a9976c2ea381a60ec2bab84
|
|
| BLAKE2b-256 |
47f3bb45759473ae913614aa7bd6e0992f16c42151e75cd1fc31ad58cebdf343
|