Code Monkey home page Code Monkey logo

stp-server's Introduction

奇点股票STP接口Python Web服务

轻量级Python Web服务封装,单页React前端,可查询证券账户及下单交易,支持仿真和实盘。

对接了L1和L2行情服务,L2需要在特定环境使用。

模拟账户注册方式:

https://n-sight.com.cn/

接口版本:

API_Python3.7_行情_v1.0.5_20230210
API_Python3.7_交易_v4.0.6_20230130

仿真测试环境:

行情前置地址:tcp://210.14.72.21:4402
交易前置地址:tcp://210.14.72.21:4400
#可用时段:同交易所交易时间,价格同步交易所,一般延迟3秒,开盘延迟可能略长一点。成交数量则包含其他仿真参与者撮合成交量。
注:正常情况下,仿真柜台在交易日早上9:25后可登录,模拟环境无集合竞价行情

演示效果

效果图

使用

配置server/account.yaml

配置STP实盘账号或仿真账号

    md_server: tcp://210.14.72.21:4402
    trader_server: tcp://210.14.72.21:4400
    InvestorID: "*****"
    UserID: "*****"
    AccountID: "*****"
    Password: "*****"
    DepartmentID: "*****"
    SSE_ShareHolderID: '*****'
    SZ_ShareHolderID: '*****'

启动服务

  • SDK限定使用Python3.7
python3.7 -m venv venv
pip install --upgrade pip setuptools -i https://mirrors.aliyun.com/pypi/simple
pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple
cd server
export PYTHONPATH=.
python app/stp_service.py

启动展示页面

npm install && npm start  

stp-server's People

Contributors

qew21 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.