Skip to main content

Rohon gateway for vn.py quant trading framework.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vnpy_rohon-6.7.2.5.tar.gz (7.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vnpy_rohon-6.7.2.5-cp313-cp313-win_amd64.whl (2.0 MB view details)

Uploaded CPython 3.13Windows x86-64

File details

Details for the file vnpy_rohon-6.7.2.5.tar.gz.

File metadata

  • Download URL: vnpy_rohon-6.7.2.5.tar.gz
  • Upload date:
  • Size: 7.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.3

File hashes

Hashes for vnpy_rohon-6.7.2.5.tar.gz
Algorithm Hash digest
SHA256 638c7d552be6045a01a943bbe2e2c6c41adb07b307776028e4a94128b879d3da
MD5 43d05e40d16988303bc9898aaeb707ed
BLAKE2b-256 57263406a11aea61f205c27928c9880807b98dd43f81dccd8e19cbe289250a8e

See more details on using hashes here.

File details

Details for the file vnpy_rohon-6.7.2.5-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for vnpy_rohon-6.7.2.5-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 488bd719f622102c6b47650f2a8677f1412b999b76732091d75829cbe544fc39
MD5 c5b9bdba5593fed1a12a19416182ec38
BLAKE2b-256 fca87dd3b8faf1eaf7f27bdb3a1a7988c9ca69b11e021946a4d78f48b85e67d0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page