Skip to main content

RQAlpha Mod ShipanE to support stock real time trading

Project description

=======
rqalpha-mod-ShiPanE
=======

`RQAlpha`_ 不支持股票实盘交易, 不过通过他的 Mod 机制,可以很方便的扩展自己的实盘交易接口。

`ShiPanE Python SDK`_ 提供了 RESTFul 接口,可以管理通达信等交易终端,因此可以实现 RQAlpha 产生的下单逻辑通过实盘易进行下单操作。


## Installation

### 安装环境

* 建议使用 Anaconda Env 来搭建 Python 虚拟环境,传送门: `基于Anaconda的环境搭建`_
* 安装 RQAlpha,参考 `RQAlpha 安装指南`_
* 更新 `lxml`

.. code-block:: bash

$ conda install -f lxml

* 安装 `rqalpha-mod-shipane`

.. code-block:: bash

$ pip install rqalpha-mod-shipane

### 安装实盘易扩展Mod

RQAlpha 提供了非常简单的 Mod 安装机制,直接使用如下命令即可完成 Mod 安装


.. code-block:: bash

# 安装实盘易Mod
$ rqalpha install shipane

# 启用实盘易Mod
$ rqalpha enable shipane

# 关闭实盘易Mod
$ rqalpha disable shipane

# 卸载实盘易Mod
$ rqalpha uninstall shipane

### FAQ

如果报如下错误

.. code-block:: bash

ImportError: dlopen(/Users/eric/anaconda/envs/rqalpha/lib/python3.6/site-packages/lxml/etree.cpython-36m-darwin.so, 2): Library not loaded: @rpath/libxml2.2.dylib
Referenced from: /Users/eric/anaconda/envs/rqalpha/lib/python3.6/site-packages/lxml/etree.cpython-36m-darwin.so
Reason: Incompatible library version: etree.cpython-36m-darwin.so requires version 12.0.0 or later, but libxml2.2.dylib provides version 10.0.0


解决方案:

.. code-block:: bash

conda install libxml2
pip install -f lxml==3.6.4

.. _RQAlpha: https://github.com/ricequant/rqalpha
.. _ShiPanE Python SDK: https://github.com/sinall/ShiPanE-Python-SDK
.. _基于Anaconda的环境搭建: http://rqalpha.readthedocs.io/zh_CN/stable/intro/detail_install.html
.. _RQAlpha 安装指南: http://rqalpha.readthedocs.io/zh_CN/stable/intro/install.html


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

rqalpha-mod-shipane-0.4.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

rqalpha_mod_shipane-0.4.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file rqalpha-mod-shipane-0.4.0.tar.gz.

File metadata

File hashes

Hashes for rqalpha-mod-shipane-0.4.0.tar.gz
Algorithm Hash digest
SHA256 3b64200f879f063b7d29f127248d42866902b025bce6b9ad5ca1bdebda6e47db
MD5 1549195d39e31a63d745e914187a5f7f
BLAKE2b-256 0052f32da94d7745c62728b326d3d2362276721c6459f73c987bf740ff82b8cd

See more details on using hashes here.

File details

Details for the file rqalpha_mod_shipane-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for rqalpha_mod_shipane-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 28265fc0df952a3eeb6200d531943cf07f0ebfa477d13bd16758b233bf760783
MD5 aad45906be4b1b9f9bc03a24b6736213
BLAKE2b-256 d2cd35f94eec4280ed84bacbd4838a41d05c6830339d2688e668dceacb915a7d

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