Metadata-Version: 2.4
Name: vnpy_da
Version: 1.18.2.5.1
Summary: DA International gateway for VeighNa quant trading framework.
Project-URL: Homepage, https://www.vnpy.com
Project-URL: Documentation, https://www.vnpy.com/docs
Project-URL: Changes, https://github.com/vnpy/vnpy_da/blob/master/CHANGELOG.md
Project-URL: Source, https://github.com/vnpy/vnpy_da/
Project-URL: Forum, https://www.vnpy.com/forum
Author-email: Xiaoyou Chen <xiaoyou.chen@mail.vnpy.com>
License: MIT
License-File: LICENSE
Keywords: algotrading,investment,quant,quantitative,trading
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: Chinese (Simplified)
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Office/Business :: Financial :: Investment
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: vnpy>=4.0.0
Requires-Dist: wmi
Description-Content-Type: text/markdown

# VeighNa框架的直达期货交易接口
<p align="center">
  <img src ="https://vnpy.oss-cn-shanghai.aliyuncs.com/vnpy-logo.png"/>
</p>

<p align="center">
    <img src ="https://img.shields.io/badge/version-1.18.2.5.1-blueviolet.svg"/>
    <img src ="https://img.shields.io/badge/platform-windows-yellow.svg"/>
    <img src ="https://img.shields.io/badge/python-3.10|3.11|3.12|3.13-blue.svg" />
    <img src ="https://img.shields.io/github/license/vnpy/vnpy.svg?color=orange"/>
</p>

## 说明

基于DAApi的1.18.2.5Python版本开发的直达期货交易接口。

## 安装

安装环境推荐基于4.0.0版本以上的【[**VeighNa Studio**](https://www.vnpy.com)】。

直接使用pip命令：

```
pip install vnpy_da
```


或者下载源代码后，解压后在cmd中运行：

```
pip install .
```

**请注意，vnpy_da需要通过pyda包加载行情API以及交易API。请通过直达国际官网-【下载】-【软件下载】-【Python API下载】下载API压缩包解压后安装对应的whl文件。**

## 使用

以脚本方式启动（script/run.py）：

```
from vnpy.event import EventEngine
from vnpy.trader.engine import MainEngine
from vnpy.trader.ui import MainWindow, create_qapp

from vnpy_da import DaGateway


def main():
    """主入口函数"""
    qapp = create_qapp()

    event_engine = EventEngine()
    main_engine = MainEngine(event_engine)
    main_engine.add_gateway(DaGateway)
    
    main_window = MainWindow(main_engine, event_engine)
    main_window.showMaximized()

    qapp.exec()


if __name__ == "__main__":
    main()
```
