SOPT gateway for vn.py quant trading framework.
Project description
VeighNa框架的CTP期权(ETF)交易接口
说明
基于CTP期权版的3.7.0接口封装开发,接口中自带的是【穿透式实盘环境】的dll文件。
安装
安装环境推荐基于4.0.0版本以上的【VeighNa Studio】。
直接使用pip命令:
pip install vnpy_sopt
或者下载源代码后,解压后在cmd中运行:
pip install .
使用源代码安装时需要进行C++编译,因此在执行上述命令之前请确保已经安装了【Visual Studio(Windows)】或者【GCC(Linux)】编译器。
如果需要以开发模式安装到当前Python环境,可以使用下述命令:
pip install -e . --no-build-isolation --config-settings=build-dir=.\vnpy_sopt\api
使用
以脚本方式启动(script/run.py):
from vnpy.event import EventEngine
from vnpy.trader.engine import MainEngine
from vnpy.trader.ui import MainWindow, create_qapp
from vnpy_sopt import SoptGateway
def main():
"""主入口函数"""
qapp = create_qapp()
event_engine = EventEngine()
main_engine = MainEngine(event_engine)
main_engine.add_gateway(SoptGateway)
main_window = MainWindow(main_engine, event_engine)
main_window.showMaximized()
qapp.exec()
if __name__ == "__main__":
main()
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
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
File details
Details for the file vnpy_sopt-3.7.1.2.tar.gz.
File metadata
- Download URL: vnpy_sopt-3.7.1.2.tar.gz
- Upload date:
- Size: 6.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee0e599cc9b0459509d6f125d7dd22a3b7c6786098e6ff532b9270b07baf8ffa
|
|
| MD5 |
f22b02e4c2a40afa8689e685608e97ba
|
|
| BLAKE2b-256 |
eab830c6896a8dcb4218d7ed1cb84b3caa739fac2ccafb224f077524ecc8d1e3
|
File details
Details for the file vnpy_sopt-3.7.1.2-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: vnpy_sopt-3.7.1.2-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 3.5 MB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
139827746bc30fa0c21a84f7e064da72f5096106bee9eda5bffd749f232965c6
|
|
| MD5 |
b721cb9c4669bf2bcda6297eb04be593
|
|
| BLAKE2b-256 |
ecc1d50c6faaad71d7f1786cc8ab66c96ea66f0cd643334ac0805422b0bdc122
|