快捷量化助手(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.tar.gz
(88.4 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-py3-none-any.whl
(40.7 kB
view details)
File details
Details for the file qka-1.0.1.tar.gz.
File metadata
- Download URL: qka-1.0.1.tar.gz
- Upload date:
- Size: 88.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e399cd8070b59a1cd3b856b2923067d8b94e7126a6ab2ec0ad3a188a3b9c3a8
|
|
| MD5 |
7de7ef04749db0e2d35e680ba7df318f
|
|
| BLAKE2b-256 |
fde7781d041ac3c469cc486d07e771b2d6c5372aa53761ee23fea0291b45c528
|
File details
Details for the file qka-1.0.1-py3-none-any.whl.
File metadata
- Download URL: qka-1.0.1-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 |
75fc2e90a832d8f54b656be0cadc55d672f789e487042f24bde17e76a5307fc8
|
|
| MD5 |
20b639c1563065c37c64658969b3e312
|
|
| BLAKE2b-256 |
19d891d0e1612903aaa3838c9ce961f2ead624346c70aeefad0972f3929d32bc
|