快捷量化助手(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.1.dev1.tar.gz
(88.5 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.1.dev1-py3-none-any.whl
(40.8 kB
view details)
File details
Details for the file qka-1.0.1.dev1.tar.gz.
File metadata
- Download URL: qka-1.0.1.dev1.tar.gz
- Upload date:
- Size: 88.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dcfb60a008af78978ba966172a2c3c84d7012ebc15f29d1a4d11002085edfef8
|
|
| MD5 |
2df70f2b04a469ee5d198c1ca2ac6854
|
|
| BLAKE2b-256 |
63ee0b225568766140e4df9612b4aa468a4fd09291b45060bb8f1a223f6014a5
|
File details
Details for the file qka-1.0.1.dev1-py3-none-any.whl.
File metadata
- Download URL: qka-1.0.1.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 |
5a107d25b8976b19317a02755734e5b8d3f681af2120867c1e8df7714ddc3439
|
|
| MD5 |
02fff36f0f4c921fe0f5334b9b5c45ab
|
|
| BLAKE2b-256 |
0d94c608f9c43e27a41a7e2d9db3d29dce9e2507361a5575a9e8b207e8e599ce
|