Giter Club home page Giter Club logo

shipane-python-sdk's Introduction

ShiPanE-Python-SDK

实盘易(ShiPanE)Python SDK,通达信自动化交易 API。

实盘易是爱股网旗下的股票自动化解决方案;可管理通达信等交易终端,并为用户提供基于 HTTP 协议的 RESTFul service。
交流QQ群:11527956 实盘易-股票自动交易

功能介绍

  • 简单的实盘易 HTTP API 封装,见 shipane_sdk/client.py
  • 多账号自动新股申购(自动打新)
  • 聚宽(JoinQuant)集成
  • 米筐(RiceQuant)集成

定时任务调度

  • 多账号自动新股申购(自动打新)
  • 聚宽(JoinQuant)自动跟单(抓取方式)
  • 米筐(RiceQuant)自动跟单(抓取方式)

Windows

安装

  • 安装 Python 3.5(建议安装 Anaconda3
  • cmd 中运行:pip install --no-binary shipane_sdk shipane_sdk
  • cmd 中运行:cd %UserProfile%\.shipane_sdk\config
  • cmd 中运行:echo No | copy /-Y scheduler-example.ini scheduler.ini

配置

  • cmd 中运行:explorer %UserProfile%\.shipane_sdk\config
  • 修改 scheduler.ini 中的配置(建议使用Notepad++)

运行

  • 找到 python 安装目录,例如:C:\Program Files\Anaconda3
  • cmd 下执行(具体路径自行修改):python "C:\Program Files\Anaconda3\Scripts\shipane-scheduler.py"

升级

  • cmd 中运行:pip install --upgrade --no-deps --no-binary shipane_sdk shipane_sdk
  • 参考 scheduler-example.ini 修改 scheduler.ini

Mac/Linux

安装

  • 安装 Python 3.5
  • terminal 中运行:pip install --no-binary shipane_sdk shipane_sdk
  • terminal 中运行:cp -n ~/.shipane_sdk/config/scheduler-example.ini ~/.shipane_sdk/config/scheduler.ini

配置

  • 修改 ~/.shipane_sdk/config/scheduler.ini

运行

  • terminal 中运行:shipane-scheduler.py

升级

  • terminal 中运行:pip install --upgrade --no-deps --no-binary shipane_sdk shipane_sdk
  • 参考 scheduler-example.ini 修改 scheduler.ini

聚宽(JoinQuant)集成

一. 推送方式

适用于云服务器环境,例如阿里云;特点是稳定、高效,集成简单。

准备工作

  • 部署实盘易成功。
  • 手动测试通过。
  • 聚宽(公网)可访问实盘易。

步骤

  • 将 shipane_sdk/client.py 上传至聚宽“投资研究”根目录,并重命名为 shipane_sdk.py。
  • 将 shipane_sdk/joinquant/executor.py 拷贝粘贴到 shpane_sdk.py 末尾。
  • 用法请参考 examples/joinquant/simple_strategy.py (注意将其中的 xxx.xxx.xxx.xxx 替换为实际 IP)。

二. 抓取方式

无需云服务器,采用定时轮询的方式,实时性不如"推送方式"。

准备工作

  • 部署实盘易成功。
  • 手动测试通过。

步骤

定时任务调度

米筐(RiceQuant)集成

一. 推送方式

适用于云服务器环境,例如阿里云;特点是稳定、高效,集成简单。

准备工作

  • 部署实盘易成功。
  • 手动测试通过。
  • 米筐(公网)可访问实盘易。

步骤

  • 将 shipane_sdk/client.py 上传米筐“策略研究”根目录,并重命名为 shipane_sdk.py。
  • 将 shipane_sdk/ricequant/executor.py 拷贝粘贴到 shpane_sdk.py 末尾。
  • 用法请参考 examples/ricequant/simple_strategy.py (注意将其中的 xxx.xxx.xxx.xxx 替换为实际 IP)。

二. 抓取方式

采用定时轮询的方式。

准备工作

  • 部署实盘易成功。
  • 手动测试通过。

步骤

定时任务调度

其他语言 SDK

C# SDK

由网友 @YBO(QQ:259219140)开发。

shipane-python-sdk's People

Contributors

sinall avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.