Rohon gateway for vn.py quant trading framework.
Project description
VeighNa框架的融航资管系统交易接口
说明
基于融航期货资管系统的6.5.1接口封装开发,接口中自带的是【穿透式实盘环境】的dll文件。
安装
安装环境推荐基于4.0.0版本以上的【VeighNa Studio】。
直接使用pip命令:
pip install vnpy_rohon
或者下载源代码后,解压后在cmd中运行:
pip install .
使用源代码安装时需要进行C++编译,因此在执行上述命令之前请确保已经安装了【Visual Studio(Windows)】或者【GCC(Linux)】编译器。
如果需要以开发模式安装到当前Python环境,可以使用下述命令:
pip install -e . --no-build-isolation --config-settings=build-dir=.\vnpy_rohon\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_rohon import RohonGateway
def main():
"""主入口函数"""
qapp = create_qapp()
event_engine = EventEngine()
main_engine = MainEngine(event_engine)
main_engine.add_gateway(RohonGateway)
main_window = MainWindow(main_engine, event_engine)
main_window.showMaximized()
qapp.exec()
if __name__ == "__main__":
main()
连接
如果启动时报错“ImportError: DLL load failed: 找不到指定的模块。”,可自行下载vcredist2010解决。
Linux运行
Linux系统下运行API时,融航接口需要加载两个so文件:librohonbase.so 和 libLinuxDataCollect.so。
为了确保这两个文件能被正常加载,需要将其放置到系统lib目录下。
因此在Linux系统上进行安装时,推荐git clone当前仓库后,使用脚本执行安装:
sudo bash install_rohon.sh
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_rohon-6.5.1.22.tar.gz.
File metadata
- Download URL: vnpy_rohon-6.5.1.22.tar.gz
- Upload date:
- Size: 2.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8894e7d00c7205599460961618f85404f8a9b04ea73e5b117d0225d1fccbbf2d
|
|
| MD5 |
c35112e5b5140906410695744ca339c4
|
|
| BLAKE2b-256 |
6b119c1b27e288e6926e9573f28f2fcea2f6e0c4b1b9097c0b428c8e29505044
|
File details
Details for the file vnpy_rohon-6.5.1.22-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: vnpy_rohon-6.5.1.22-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 2.0 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 |
7f6a52d57ca8c611167aed50a435f94827e38f22bcd383892d3cf725f45d515e
|
|
| MD5 |
daee161a8c92f6f776796cba8a1cf918
|
|
| BLAKE2b-256 |
755fa8ebab9a573c7d993a91eb377615bf6c7ee366d0fb5468f012d8588cc543
|