Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Raytone-D/puppet

Repository files navigation

本项目为学习WIN32 API而写,擅自将puppet用于生产环境,后果自负!

推荐一站式解决方案 【策略易】 http://www.iguuu.com/e?x=19829


快速入门:

import puppet
# 自动登录账户, comm_pwd 是可选参数
accinfo = {
 'account_no': '你的账号',
 'password': '登录密码',
 'client_path': 'path/to/xiadan.exe',
 # 'comm_pwd': '通讯密码'
}
acc = puppet.login(accinfo)
# 绑定已登录账户
acc = puppet.Account(title='')
acc.buy('000001', 12.68, 100)
acc.sell('000001', 12.68, 100)
# 只支持按代码撤单。
acc.cancel_buy('510050')
acc.cancel_all()
acc.query('historical_deal')
acc.query('position')

使用环境: 1、Python3.5及以上,强烈推荐使用Anaconda3的最新版本。

2、(不推荐!)Linux平台需安装最新的Wine,环境设为WIN7,并安装Windows平台的Anaconda3。

安装:

打开命令提示符或Windows PowerShell,然后执行:

pip install https://github.com/Raytone-D/puppet/archive/master.zip

或者

git clone https://github.com/Raytone-D/puppet.git
pip install -e puppet

技术说明:

1、本项目使用User32.dll, Kernel32.dll所涵盖的win32 API。

2、按MSDN的API说明,win32 API支持WIN2000及以上版本,建议Win 7+。

鸣谢:

///////////////////////做事有底线///////////////////////////////////////

Packages

No packages published

Contributors 3

Languages

AltStyle によって変換されたページ (->オリジナル) /