快捷量化助手(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.dev1.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.dev1-py3-none-any.whl
(40.8 kB
view details)
File details
Details for the file qka-1.0.3.dev1.tar.gz.
File metadata
- Download URL: qka-1.0.3.dev1.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 |
d34900f1b45a5342efd5149756df5e81e8eb3971b789f02071a820997f269155
|
|
| MD5 |
60d595db869f7056a77336c0fc6236b8
|
|
| BLAKE2b-256 |
849a8ab1b91f2e431d68c5a0ee650e5fcb3a205bcfab665ebed3221906dcbe45
|
File details
Details for the file qka-1.0.3.dev1-py3-none-any.whl.
File metadata
- Download URL: qka-1.0.3.dev1-py3-none-any.whl
- Upload date:
- Size: 40.8 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 |
813f92cc38e926b6b771ecb512a920f24a66f75e5a56ca970d12eef22d9e9f48
|
|
| MD5 |
46256643505346a08e48ed0bbbfc8b78
|
|
| BLAKE2b-256 |
72652efd06ba82757d200a95ec53615d9f746a00abf6312e8f8e62214f16d912
|