vnpy-binance


Namevnpy-binance JSON
Version 2024.3.12 PyPI version JSON
download
home_pagehttps://www.github.com/veighna-global
SummaryBINANCE trading gateway for VeighNa Evo.
upload_time2024-03-12 05:20:31
maintainer
docs_urlNone
authorVeighNa Global
requires_python
licenseMIT
keywords quant quantitative investment trading algotrading binance btc crypto
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Binance trading gateway for VeighNa Evo

<p align="center">
  <img src ="https://github.com/veighna-global/vnpy_evo/blob/dev/logo.png" width="300" height="300"/>
</p>

<p align="center">
    <img src ="https://img.shields.io/badge/version-2024.3.12-blueviolet.svg"/>
    <img src ="https://img.shields.io/badge/platform-windows|linux|macos-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/veighna-global/vnpy_evo.svg?color=orange"/>
</p>


## Introduction

This gateway is developed based on Binance's REST and Websocket API, and supports spot, linear contract and inverse contract trading.

**For derivatives contract trading, please notice:**

1. Only supports cross margin mode.
2. Only supports one-way position mode.

## Install

Users can easily install ``vnpy_binance`` by pip according to the following command.

```
pip install vnpy_binance
```

Also, users can install ``vnpy_binance`` using the source code. Clone the repository and install as follows:

```
git clone https://github.com/veighna-global/vnpy_binance.git && cd vnpy_binance

python setup.py install
```

## A Simple Example

Save this as run.py.

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

from vnpy_binance import (
    BinanceSpotGateway,
    BinanceLinearGateway,
    BinanceInverseGateway
)


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

    event_engine = EventEngine()
    main_engine = MainEngine(event_engine)
    main_engine.add_gateway(BinanceSpotGateway)
    main_engine.add_gateway(BinanceLinearGateway)
    main_engine.add_gateway(BinanceInverseGateway)

    main_window = MainWindow(main_engine, event_engine)
    main_window.showMaximized()

    qapp.exec()


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

            

Raw data

            {
    "_id": null,
    "home_page": "https://www.github.com/veighna-global",
    "name": "vnpy-binance",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "quant,quantitative,investment,trading,algotrading,binance,btc,crypto",
    "author": "VeighNa Global",
    "author_email": "veighna@hotmail.com",
    "download_url": "https://files.pythonhosted.org/packages/3d/8f/8dba165e0d2cb7a42d27c482a6e650eee6fb74f622f882b1732739a114af/vnpy_binance-2024.3.12.tar.gz",
    "platform": null,
    "description": "# Binance trading gateway for VeighNa Evo\r\n\r\n<p align=\"center\">\r\n  <img src =\"https://github.com/veighna-global/vnpy_evo/blob/dev/logo.png\" width=\"300\" height=\"300\"/>\r\n</p>\r\n\r\n<p align=\"center\">\r\n    <img src =\"https://img.shields.io/badge/version-2024.3.12-blueviolet.svg\"/>\r\n    <img src =\"https://img.shields.io/badge/platform-windows|linux|macos-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/veighna-global/vnpy_evo.svg?color=orange\"/>\r\n</p>\r\n\r\n\r\n## Introduction\r\n\r\nThis gateway is developed based on Binance's REST and Websocket API, and supports spot, linear contract and inverse contract trading.\r\n\r\n**For derivatives contract trading, please notice:**\r\n\r\n1. Only supports cross margin mode.\r\n2. Only supports one-way position mode.\r\n\r\n## Install\r\n\r\nUsers can easily install ``vnpy_binance`` by pip according to the following command.\r\n\r\n```\r\npip install vnpy_binance\r\n```\r\n\r\nAlso, users can install ``vnpy_binance`` using the source code. Clone the repository and install as follows:\r\n\r\n```\r\ngit clone https://github.com/veighna-global/vnpy_binance.git && cd vnpy_binance\r\n\r\npython setup.py install\r\n```\r\n\r\n## A Simple Example\r\n\r\nSave this as run.py.\r\n\r\n```\r\nfrom vnpy_evo.event import EventEngine\r\nfrom vnpy_evo.trader.engine import MainEngine\r\nfrom vnpy_evo.trader.ui import MainWindow, create_qapp\r\n\r\nfrom vnpy_binance import (\r\n    BinanceSpotGateway,\r\n    BinanceLinearGateway,\r\n    BinanceInverseGateway\r\n)\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(BinanceSpotGateway)\r\n    main_engine.add_gateway(BinanceLinearGateway)\r\n    main_engine.add_gateway(BinanceInverseGateway)\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",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "BINANCE trading gateway for VeighNa Evo.",
    "version": "2024.3.12",
    "project_urls": {
        "Homepage": "https://www.github.com/veighna-global"
    },
    "split_keywords": [
        "quant",
        "quantitative",
        "investment",
        "trading",
        "algotrading",
        "binance",
        "btc",
        "crypto"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4a606564c858ec1662b20bacf355db2210a2805fa982b5f1cd58353d19014d7a",
                "md5": "40d029b986f429cbc75d5ad453d9fe59",
                "sha256": "30c9186387abe3f5469754ab2eda3b31a286f610cc9544de402b7461772f34e2"
            },
            "downloads": -1,
            "filename": "vnpy_binance-2024.3.12-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "40d029b986f429cbc75d5ad453d9fe59",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 33537,
            "upload_time": "2024-03-12T05:20:29",
            "upload_time_iso_8601": "2024-03-12T05:20:29.403798Z",
            "url": "https://files.pythonhosted.org/packages/4a/60/6564c858ec1662b20bacf355db2210a2805fa982b5f1cd58353d19014d7a/vnpy_binance-2024.3.12-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3d8f8dba165e0d2cb7a42d27c482a6e650eee6fb74f622f882b1732739a114af",
                "md5": "5ef9c12ce460b86424529b3610742424",
                "sha256": "11b392b5209b49e5bd5c0e64b0451a957c5527f757e4690a22ec09abc0dae334"
            },
            "downloads": -1,
            "filename": "vnpy_binance-2024.3.12.tar.gz",
            "has_sig": false,
            "md5_digest": "5ef9c12ce460b86424529b3610742424",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 23844,
            "upload_time": "2024-03-12T05:20:31",
            "upload_time_iso_8601": "2024-03-12T05:20:31.596081Z",
            "url": "https://files.pythonhosted.org/packages/3d/8f/8dba165e0d2cb7a42d27c482a6e650eee6fb74f622f882b1732739a114af/vnpy_binance-2024.3.12.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-12 05:20:31",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "vnpy-binance"
}
        
Elapsed time: 0.22003s