快捷量化助手(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.3.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.3-py3-none-any.whl
(40.7 kB
view details)
File details
Details for the file qka-1.0.3.tar.gz.
File metadata
- Download URL: qka-1.0.3.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 |
d7aec7bbfdc8b6b45a9e2a4c9c7f6dd84cd3b66f20a3f15d0c12fec13f625f32
|
|
| MD5 |
d633ad7cedffaa2cfc3a80a7cf34405a
|
|
| BLAKE2b-256 |
41c1338b8af462990b3c1410911ad7ee321654a2a8aae3b692d0fc19aebbc2ec
|
File details
Details for the file qka-1.0.3-py3-none-any.whl.
File metadata
- Download URL: qka-1.0.3-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 |
aa811f0d0103c6765c1c557f626c00afe7d7aa5818567ecdc340dabaee0ffe9f
|
|
| MD5 |
ad5ada8d6f4b4a59a605c132b777402c
|
|
| BLAKE2b-256 |
80b23a66aa0fb521324a8f6f88177f83652b697b450b8bf64a3300e1f65d6259
|