vnpy-tap


Namevnpy-tap JSON
Version 9.4.4 PyPI version JSON
download
home_pagehttps://www.vnpy.com
SummaryTAP gateway for VeighNa quant trading framework.
upload_time2024-07-25 03:54:31
maintainerNone
docs_urlNone
authorXiaoyou Chen
requires_python>=3.7
licenseMIT
keywords quant quantitative investment trading algotrading
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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-9.4.4-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-blue.svg" />
    <img src ="https://img.shields.io/github/license/vnpy/vnpy.svg?color=orange"/>
</p>

## 说明

基于易盛的北斗星交易API的9.0接口(iTapTradeApi9.3.8.7)封装开发的接口,适用于香港、新加坡以及其他境外交易所行情/交易。

## 安装

安装需要基于3.9.0版本以上的[VeighNa Studio](https://www.vnpy.com)。

直接使用pip命令:

```
pip install vnpy_tap
```


或者下载源代码后,解压后在cmd中运行:

```
pip install .
```

使用源代码安装时需要进行C++编译,因此在执行上述命令之前请确保已经安装了【Visual Studio(Windows)】或者【GCC(Linux)】编译器。


## 使用

以脚本方式启动(script/run.py):

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

from vnpy_tap import TapGateway


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

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

    qapp.exec()


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


## 连接

**请注意,若需通过子账号下单,请在连接登录时对【子账号】与【区域代码】进行配置**。

如果下单人位于美国或加拿大,地址信息需填写到省份,共5个字节,省份信息如下:ftp://ftp.cmegroup.com/fix/coo/country_state.rtf

如果下单人位于其他地区,地址信息需填写到国家,共2个字节,国家信息如下:ftp://ftp.cmegroup.com/fix/coo/country_codes.rtf

            

Raw data

            {
    "_id": null,
    "home_page": "https://www.vnpy.com",
    "name": "vnpy-tap",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "quant, quantitative, investment, trading, algotrading",
    "author": "Xiaoyou Chen",
    "author_email": "xiaoyou.chen@mail.vnpy.com",
    "download_url": "https://files.pythonhosted.org/packages/ff/a4/73d53dd5c191c6e1066e7a8d2a3722c104bb3a951334f19831e93d2892bb/vnpy_tap-9.4.4.tar.gz",
    "platform": null,
    "description": "# VeighNa\u6846\u67b6\u7684\u6613\u76db\u5916\u76d8\u4ea4\u6613\u63a5\u53e3\r\n\r\n<p align=\"center\">\r\n  <img src =\"https://vnpy.oss-cn-shanghai.aliyuncs.com/vnpy-logo.png\"/>\r\n</p>\r\n\r\n<p align=\"center\">\r\n    <img src =\"https://img.shields.io/badge/version-9.4.4-blueviolet.svg\"/>\r\n    <img src =\"https://img.shields.io/badge/platform-windows-yellow.svg\"/>\r\n    <img src =\"https://img.shields.io/badge/python-3.10|3.11|3.12-blue.svg\" />\r\n    <img src =\"https://img.shields.io/github/license/vnpy/vnpy.svg?color=orange\"/>\r\n</p>\r\n\r\n## \u8bf4\u660e\r\n\r\n\u57fa\u4e8e\u6613\u76db\u7684\u5317\u6597\u661f\u4ea4\u6613API\u76849.0\u63a5\u53e3\uff08iTapTradeApi9.3.8.7\uff09\u5c01\u88c5\u5f00\u53d1\u7684\u63a5\u53e3\uff0c\u9002\u7528\u4e8e\u9999\u6e2f\u3001\u65b0\u52a0\u5761\u4ee5\u53ca\u5176\u4ed6\u5883\u5916\u4ea4\u6613\u6240\u884c\u60c5/\u4ea4\u6613\u3002\r\n\r\n## \u5b89\u88c5\r\n\r\n\u5b89\u88c5\u9700\u8981\u57fa\u4e8e3.9.0\u7248\u672c\u4ee5\u4e0a\u7684[VeighNa Studio](https://www.vnpy.com)\u3002\r\n\r\n\u76f4\u63a5\u4f7f\u7528pip\u547d\u4ee4\uff1a\r\n\r\n```\r\npip install vnpy_tap\r\n```\r\n\r\n\r\n\u6216\u8005\u4e0b\u8f7d\u6e90\u4ee3\u7801\u540e\uff0c\u89e3\u538b\u540e\u5728cmd\u4e2d\u8fd0\u884c\uff1a\r\n\r\n```\r\npip install .\r\n```\r\n\r\n\u4f7f\u7528\u6e90\u4ee3\u7801\u5b89\u88c5\u65f6\u9700\u8981\u8fdb\u884cC++\u7f16\u8bd1\uff0c\u56e0\u6b64\u5728\u6267\u884c\u4e0a\u8ff0\u547d\u4ee4\u4e4b\u524d\u8bf7\u786e\u4fdd\u5df2\u7ecf\u5b89\u88c5\u4e86\u3010Visual Studio\uff08Windows\uff09\u3011\u6216\u8005\u3010GCC\uff08Linux\uff09\u3011\u7f16\u8bd1\u5668\u3002\r\n\r\n\r\n## \u4f7f\u7528\r\n\r\n\u4ee5\u811a\u672c\u65b9\u5f0f\u542f\u52a8\uff08script/run.py\uff09\uff1a\r\n\r\n```\r\nfrom vnpy.event import EventEngine\r\nfrom vnpy.trader.engine import MainEngine\r\nfrom vnpy.trader.ui import MainWindow, create_qapp\r\n\r\nfrom vnpy_tap import TapGateway\r\n\r\n\r\ndef main():\r\n    \"\"\"\u4e3b\u5165\u53e3\u51fd\u6570\"\"\"\r\n    qapp = create_qapp()\r\n\r\n    event_engine = EventEngine()\r\n    main_engine = MainEngine(event_engine)\r\n    main_engine.add_gateway(TapGateway)\r\n    \r\n    main_window = MainWindow(main_engine, event_engine)\r\n    main_window.showMaximized()\r\n\r\n    qapp.exec()\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    main()\r\n```\r\n\r\n\r\n## \u8fde\u63a5\r\n\r\n**\u8bf7\u6ce8\u610f\uff0c\u82e5\u9700\u901a\u8fc7\u5b50\u8d26\u53f7\u4e0b\u5355\uff0c\u8bf7\u5728\u8fde\u63a5\u767b\u5f55\u65f6\u5bf9\u3010\u5b50\u8d26\u53f7\u3011\u4e0e\u3010\u533a\u57df\u4ee3\u7801\u3011\u8fdb\u884c\u914d\u7f6e**\u3002\r\n\r\n\u5982\u679c\u4e0b\u5355\u4eba\u4f4d\u4e8e\u7f8e\u56fd\u6216\u52a0\u62ff\u5927\uff0c\u5730\u5740\u4fe1\u606f\u9700\u586b\u5199\u5230\u7701\u4efd\uff0c\u51715\u4e2a\u5b57\u8282\uff0c\u7701\u4efd\u4fe1\u606f\u5982\u4e0b\uff1aftp://ftp.cmegroup.com/fix/coo/country_state.rtf\r\n\r\n\u5982\u679c\u4e0b\u5355\u4eba\u4f4d\u4e8e\u5176\u4ed6\u5730\u533a\uff0c\u5730\u5740\u4fe1\u606f\u9700\u586b\u5199\u5230\u56fd\u5bb6\uff0c\u51712\u4e2a\u5b57\u8282\uff0c\u56fd\u5bb6\u4fe1\u606f\u5982\u4e0b\uff1aftp://ftp.cmegroup.com/fix/coo/country_codes.rtf\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "TAP gateway for VeighNa quant trading framework.",
    "version": "9.4.4",
    "project_urls": {
        "Homepage": "https://www.vnpy.com"
    },
    "split_keywords": [
        "quant",
        " quantitative",
        " investment",
        " trading",
        " algotrading"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6b2cfae0cd510aa3afed11674f917ae4ac19d7d7c7a17a0ab9c9b7e0878c1c19",
                "md5": "6fd79965a5e471af35b8cd6ace547969",
                "sha256": "b7666d946fdd39733bb85e734c9b792294aec8ed9e7ecc71aeb675e34b6d3b3d"
            },
            "downloads": -1,
            "filename": "vnpy_tap-9.4.4-cp310-cp310-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "6fd79965a5e471af35b8cd6ace547969",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.7",
            "size": 3242079,
            "upload_time": "2024-07-25T03:54:29",
            "upload_time_iso_8601": "2024-07-25T03:54:29.964134Z",
            "url": "https://files.pythonhosted.org/packages/6b/2c/fae0cd510aa3afed11674f917ae4ac19d7d7c7a17a0ab9c9b7e0878c1c19/vnpy_tap-9.4.4-cp310-cp310-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ffa473d53dd5c191c6e1066e7a8d2a3722c104bb3a951334f19831e93d2892bb",
                "md5": "466811da86e5eca99a5d63822829d20a",
                "sha256": "5c89083ef931d487c1487770ac358346fcb17434355da7e3233aeb6253424c38"
            },
            "downloads": -1,
            "filename": "vnpy_tap-9.4.4.tar.gz",
            "has_sig": false,
            "md5_digest": "466811da86e5eca99a5d63822829d20a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 2469320,
            "upload_time": "2024-07-25T03:54:31",
            "upload_time_iso_8601": "2024-07-25T03:54:31.918391Z",
            "url": "https://files.pythonhosted.org/packages/ff/a4/73d53dd5c191c6e1066e7a8d2a3722c104bb3a951334f19831e93d2892bb/vnpy_tap-9.4.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-25 03:54:31",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "vnpy-tap"
}
        
Elapsed time: 0.28482s