1- ShiPanE -Python-SDK
1+ StrategyEase -Python-SDK
22==================
33
4- 实盘易(ShiPanE )Python SDK,通达信自动化交易 API 。
4+ 策略易(StrategyEase )Python SDK。
55
6- | 实盘易是 \ `爱股网 <http://www.iguuu.com>`__\ 旗下的股票自动化解决方案;提供基于 HTTP 协议的 RESTFul Service,从而管理通达信等交易终端。
6+ | 策略易是 \ `爱股网 <http://www.iguuu.com>`__\ 旗下的股票自动化解决方案;提供基于 HTTP 协议的 RESTFul Service,从而管理通达信等交易终端。
77| 详情见:http://www.iguuu.com/e
8- | 交流QQ群:11527956 |实盘易-股票自动交易 |
8+ | 交流QQ群:11527956 |策略交流 |
99|
1010
1111.. contents :: **目录**
1212
1313原理概述
1414--------
15- - 实盘易通过调用 WINDOWS API 对通达信进行操作。
16- - 实盘易提供基于 HTTP 协议的 RESTFul Service/API。
17- - SDK 对 API 进行了封装(由 shipane_sdk /client.py 中的 Client 类实现)。
15+ - 策略易通过调用 WINDOWS API 对通达信进行操作。
16+ - 策略易提供基于 HTTP 协议的 RESTFul Service/API。
17+ - SDK 对 API 进行了封装(由 strategyease_sdk /client.py 中的 Client 类实现)。
1818- 本地策略或量化交易平台(目前支持聚宽、米筐、优矿)的模拟交易通过调用 SDK 实现自动下单。
1919
2020功能介绍
2121--------
2222
23- - 简单的实盘易 HTTP API 封装,见 shipane_sdk /client.py
23+ - 简单的策略易 HTTP API 封装,见 strategyease_sdk /client.py
2424- 多账号自动新股申购(自动打新)
2525- 多账号自动逆回购
2626- 定时批量下单
@@ -36,11 +36,11 @@ ShiPanE-Python-SDK
3636
3737 import logging
3838
39- import shipane_sdk
39+ import strategyease_sdk
4040
4141 logging.basicConfig(level = logging.DEBUG )
4242
43- client = shipane_sdk .Client(host = ' localhost' , port = 8888 , key = ' ' )
43+ client = strategyease_sdk .Client(host = ' localhost' , port = 8888 , key = ' ' )
4444 account_info = client.get_account(' title:monijiaoyi' )
4545 print (account_info)
4646
@@ -49,17 +49,17 @@ ShiPanE-Python-SDK
4949测试用例
5050--------------
5151
52- 实盘易 HTTP API 封装对应的测试用例见:
52+ 策略易 HTTP API 封装对应的测试用例见:
5353
54- +------------+-------------------------------------------------+
55- | 查询及下单 | tests/shipane_sdk /test_client.py |
56- +------------+-------------------------------------------------+
57- | 客户端管理 | tests/shipane_sdk /test_client_management.py |
58- +------------+-------------------------------------------------+
59- | 融资融券 | tests/shipane_sdk /test_client_margin_trading.py |
60- +------------+-------------------------------------------------+
61- | 其他 | tests/shipane_sdk /... |
62- +------------+-------------------------------------------------+
54+ +------------+------------------------------------------------------ +
55+ | 查询及下单 | tests/strategyease_sdk /test_client.py |
56+ +------------+------------------------------------------------------ +
57+ | 客户端管理 | tests/strategyease_sdk /test_client_management.py |
58+ +------------+------------------------------------------------------ +
59+ | 融资融券 | tests/strategyease_sdk /test_client_margin_trading.py |
60+ +------------+------------------------------------------------------ +
61+ | 其他 | tests/strategyease_sdk /... |
62+ +------------+------------------------------------------------------ +
6363
6464定时任务调度
6565--------------
@@ -83,40 +83,40 @@ Windows
8383- 安装 Python 3.5(建议安装 `Anaconda3-4.2.0 <https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/ >`_)
8484- cmd 中运行
8585
86- +--------+---------------------------------------------------------------+
87- | 正式版 | :code: `pip install --no-binary shipane_sdk shipane_sdk ` |
88- +--------+---------------------------------------------------------------+
89- | 测试版 | :code: `pip install --pre --no-binary shipane_sdk shipane_sdk ` |
90- +--------+---------------------------------------------------------------+
86+ +--------+------------------------------------------------------------------------- +
87+ | 正式版 | :code: `pip install --no-binary strategyease_sdk strategyease_sdk ` |
88+ +--------+------------------------------------------------------------------------- +
89+ | 测试版 | :code: `pip install --pre --no-binary strategyease_sdk strategyease_sdk ` |
90+ +--------+------------------------------------------------------------------------- +
9191
9292配置
9393^^^^
9494
95- - cmd 中运行::code: `explorer %UserProfile%\. shipane_sdk \c onfig `
95+ - cmd 中运行::code: `explorer %UserProfile%\. strategyease_sdk \c onfig `
9696- 修改 scheduler.ini 中的配置(建议使用Notepad++)
9797
9898运行
9999^^^^
100100
101- - cmd 下运行::code: `shipane -scheduler `
101+ - cmd 下运行::code: `strategyease -scheduler `
102102
103103升级
104104^^^^
105105
106106- cmd 中运行
107107
108- +--------+-----------------------------------------------------------------------------------+
109- | 正式版 | :code: `pip install --upgrade --no-deps --no-binary shipane_sdk shipane_sdk ` |
110- +--------+-----------------------------------------------------------------------------------+
111- | 测试版 | :code: `pip install --upgrade --pre --no-deps --no-binary shipane_sdk shipane_sdk ` |
112- +--------+-----------------------------------------------------------------------------------+
108+ +--------+--------------------------------------------------------------------------------------------- +
109+ | 正式版 | :code: `pip install --upgrade --no-deps --no-binary strategyease_sdk strategyease_sdk ` |
110+ +--------+--------------------------------------------------------------------------------------------- +
111+ | 测试版 | :code: `pip install --upgrade --pre --no-deps --no-binary strategyease_sdk strategyease_sdk ` |
112+ +--------+--------------------------------------------------------------------------------------------- +
113113
114114- 参考 scheduler-template.ini 修改 scheduler.ini
115115
116116日志
117117^^^^
118118
119- - cmd 中运行::code: `explorer %UserProfile%\A ppData\L ocal\爱 股网\实 盘易 `
119+ - cmd 中运行::code: `explorer %UserProfile%\A ppData\L ocal\爱 股网\策 略易 `
120120
121121Mac/Linux
122122~~~~~~~~~
@@ -127,32 +127,32 @@ Mac/Linux
127127- 安装 Python 3.5
128128- terminal 中运行
129129
130- +--------+---------------------------------------------------------------+
131- | 正式版 | :code: `pip install --no-binary shipane_sdk shipane_sdk ` |
132- +--------+---------------------------------------------------------------+
133- | 测试版 | :code: `pip install --pre --no-binary shipane_sdk shipane_sdk ` |
134- +--------+---------------------------------------------------------------+
130+ +--------+------------------------------------------------------------------------- +
131+ | 正式版 | :code: `pip install --no-binary strategyease_sdk strategyease_sdk ` |
132+ +--------+------------------------------------------------------------------------- +
133+ | 测试版 | :code: `pip install --pre --no-binary strategyease_sdk strategyease_sdk ` |
134+ +--------+------------------------------------------------------------------------- +
135135
136136配置
137137^^^^
138138
139- - 修改 ~/.shipane_sdk /config/scheduler.ini
139+ - 修改 ~/.strategyease_sdk /config/scheduler.ini
140140
141141运行
142142^^^^
143143
144- - terminal 中运行::code: `shipane -scheduler:code: `
144+ - terminal 中运行::code: `strategyease -scheduler:code: `
145145
146146升级
147147^^^^
148148
149149- terminal 中运行
150150
151- +--------+-----------------------------------------------------------------------------------+
152- | 正式版 | :code: `pip install --upgrade --no-deps --no-binary shipane_sdk shipane_sdk ` |
153- +--------+-----------------------------------------------------------------------------------+
154- | 测试版 | :code: `pip install --upgrade --pre --no-deps --no-binary shipane_sdk shipane_sdk ` |
155- +--------+-----------------------------------------------------------------------------------+
151+ +--------+--------------------------------------------------------------------------------------------- +
152+ | 正式版 | :code: `pip install --upgrade --no-deps --no-binary strategyease_sdk strategyease_sdk ` |
153+ +--------+--------------------------------------------------------------------------------------------- +
154+ | 测试版 | :code: `pip install --upgrade --pre --no-deps --no-binary strategyease_sdk strategyease_sdk ` |
155+ +--------+--------------------------------------------------------------------------------------------- +
156156
157157- 参考 scheduler-template.ini 修改 scheduler.ini
158158
@@ -167,18 +167,18 @@ Mac/Linux
167167准备工作
168168^^^^^^^^
169169
170- - 部署实盘易 。
170+ - 部署策略易 。
171171- 本地测试通过。
172172- 远程测试通过。
173173
174174步骤
175175^^^^
176176
177- - 下载 `scripts/shipane_sdk_installer .ipynb `_ 并上传至“投资研究”根目录。
177+ - 下载 `scripts/strategyease_sdk_installer .ipynb `_ 并上传至“投资研究”根目录。
178178- 打开该文件,设置参数:QUANT_NAME = 'joinquant'
179179- 查看其它参数并根据需要进行修改。
180180- 点击工具栏中的右箭头运行该文件,并检查窗口中打印的日志。
181- - 修改 shipane_sdk_config .yaml,升级后需参考 shipane_sdk_config_template .yaml 进行修改。
181+ - 修改 strategyease_sdk_config .yaml,升级后需参考 strategyease_sdk_config_template .yaml 进行修改。
182182- 修改策略代码,可参考如下示例:
183183
184184 - examples/joinquant/simple\_ strategy.py - 基本跟单用法(侵入式设计,不推荐)
@@ -192,9 +192,9 @@ Mac/Linux
192192- 同步操作根据模拟盘持仓比例对实盘进行调整。
193193- 同步操作依赖于“可用”资金。请留意配置文件中“撤销全部订单”相关选项。
194194- “新股申购”不影响“可用”资金,并且不可被撤销,因此不影响同步功能。
195- - 同步操作依赖于实盘易 API /adjustments;因此也依赖于“查询投资组合”API,使用前请先做好测试及配置。
195+ - 同步操作依赖于策略易 API /adjustments;因此也依赖于“查询投资组合”API,使用前请先做好测试及配置。
196196- 同步操作使用“市价单”。
197- - 如遇到策略报错“ImportError: No module named shipane_sdk ”,请稍后重试。
197+ - 如遇到策略报错“ImportError: No module named strategyease_sdk ”,请稍后重试。
198198- 量化平台模拟交易运行中升级 SDK,需重启生效。
199199
200200二. 抓取方式
@@ -205,7 +205,7 @@ Mac/Linux
205205准备工作
206206^^^^^^^^
207207
208- - 部署实盘易 。
208+ - 部署策略易 。
209209- 测试通过。
210210
211211步骤
@@ -224,14 +224,14 @@ Mac/Linux
224224准备工作
225225^^^^^^^^
226226
227- - 部署实盘易 。
227+ - 部署策略易 。
228228- 本地测试通过。
229229- 远程测试通过。
230230
231231步骤
232232^^^^
233233
234- - 下载 `scripts/shipane_sdk_installer .ipynb `_ 并上传至“策略研究”根目录。
234+ - 下载 `scripts/strategyease_sdk_installer .ipynb `_ 并上传至“策略研究”根目录。
235235- 打开该文件,设置参数:QUANT_NAME = 'ricequant'
236236- 查看其它参数并根据需要进行修改。
237237- 点击工具栏中的右箭头运行该文件,并检查窗口中打印的日志。
@@ -251,7 +251,7 @@ Mac/Linux
251251准备工作
252252^^^^^^^^
253253
254- - 部署实盘易 。
254+ - 部署策略易 。
255255- 测试通过。
256256
257257步骤
@@ -276,7 +276,7 @@ Mac/Linux
276276准备工作
277277^^^^^^^^
278278
279- - 部署实盘易 。
279+ - 部署策略易 。
280280- 测试通过。
281281
282282步骤
@@ -300,7 +300,7 @@ Mac/Linux
300300准备工作
301301^^^^^^^^
302302
303- - 部署实盘易 。
303+ - 部署策略易 。
304304- 测试通过。
305305
306306步骤
@@ -311,7 +311,7 @@ Mac/Linux
311311字段要求
312312^^^^^^^^
313313
314- 见实盘易 《用户手册.txt》的“查询投资组合”章节,可通过实盘易菜单 “帮助>查看帮助”访问。
314+ 见策略易 《用户手册.txt》的“查询投资组合”章节,可通过策略易菜单 “帮助>查看帮助”访问。
315315
316316其他语言 SDK
317317------------
@@ -322,9 +322,9 @@ C# SDK
322322| 由网友 @YBO(QQ:259219140)开发。
323323| 见 `ShiPanETradingSDK <http://git.oschina.net/ybo1990/ShiPanETradingSDK>`_
324324
325- .. |实盘易-股票自动交易 | image :: http://pub.idqqimg.com/wpa/images/group.png
325+ .. |策略交流 | image :: http://pub.idqqimg.com/wpa/images/group.png
326326 :target: http://shang.qq.com/wpa/qunwpa?idkey=1ce867356702f5f7c56d07d5c694e37a3b9a523efce199bb0f6ff30410c6185d%22
327327
328328.. _米筐(RiceQuant) : http://www.ricequant.com
329329
330- .. _scripts/shipane_sdk_installer .ipynb : https://raw.githubusercontent.com/sinall/ShiPanE -Python-SDK/master/scripts/shipane_sdk_installer .ipynb
330+ .. _scripts/strategyease_sdk_installer .ipynb : https://raw.githubusercontent.com/sinall/StrategyEase -Python-SDK/master/scripts/strategyease_sdk_installer .ipynb
0 commit comments