VeighNa框架的融航资管系统交易接口
说明
基于融航期货资管系统的6.7.2接口封装开发,接口中自带的是【穿透式实盘环境】的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
Release files for vnpy_rohon 6.7.2.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| vnpy_rohon-6.7.2.5.tar.gz | 7.0 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vnpy_rohon-6.7.2.5-cp313-cp313-win_amd64.whl | CPython 3.13 | CPython 3.13 | Windows x86-64 | Details |
Total release size: 9.1 MB
Release files / vnpy_rohon-6.7.2.5.tar.gz
| Download URL | vnpy_rohon-6.7.2.5.tar.gz |
|---|---|
| Size | 7.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
638c7d552be6045a01a943bbe2e2c6c41adb07b307776028e4a94128b879d3da
|
|
BLAKE2b-256 checksum How to use checksums |
57263406a11aea61f205c27928c9880807b98dd43f81dccd8e19cbe289250a8e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.3
|
Release files / vnpy_rohon-6.7.2.5-cp313-cp313-win_amd64.whl
| Download URL | vnpy_rohon-6.7.2.5-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
488bd719f622102c6b47650f2a8677f1412b999b76732091d75829cbe544fc39
|
|
BLAKE2b-256 checksum How to use checksums |
fca87dd3b8faf1eaf7f27bdb3a1a7988c9ca69b11e021946a4d78f48b85e67d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.3
|