StrategyEase-Python-SDK
策略易(StrategyEase)Python SDK。
原理概述
策略易通过调用 WINDOWS API 对交易客户端进行操作。
策略易提供基于 HTTP 协议的 RESTFul Service/API。
SDK 对 API 进行了封装(由 strategyease_sdk/client.py 中的 Client 类实现)。
本地策略或量化交易平台(目前支持聚宽、米筐、优矿)的模拟交易通过调用 SDK 实现自动下单。
功能介绍
简单的策略易 HTTP API 封装,见 strategyease_sdk/client.py
定时任务
多账号自动新股申购(自动打新)
多账号自动逆回购
定时批量下单
策略集成
聚宽(JoinQuant)集成
米筐(RiceQuant)集成
优矿(Uqer)集成
果仁(Guorn)集成
安装
安装 Python 3.5(建议安装 Anaconda3-4.2.0)
命令行中运行
正式版 |
|
测试版 |
|
升级
命令行中运行
正式版 |
|
测试版 |
|
基本用法
import logging
import strategyease_sdk
logging.basicConfig(level=logging.DEBUG)
client = strategyease_sdk.Client(host='localhost', port=8888, key='')
account_info = client.get_account('title:monijiaoyi')
print(account_info)
详见:examples/basic_example.py
测试用例
策略易 HTTP API 封装对应的测试用例见:
查询及下单 |
tests/strategyease_sdk/test_client.py |
客户端管理 |
tests/strategyease_sdk/test_client_management.py |
融资融券 |
tests/strategyease_sdk/test_client_margin_trading.py |
其他 |
tests/strategyease_sdk/… |
定时任务调度
见《定时任务调度说明》
策略集成
见《策略集成说明》
其他语言 SDK
C# SDK
Metadata
Release files for strategyease-sdk 2.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| strategyease_sdk-2.1.0.tar.gz | 35.6 kB | Without provenance | Details for strategyease_sdk-2.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| strategyease_sdk-2.1.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for strategyease_sdk-2.1.0-py2.py3-none-any.whl |
Total release size: 134.1 kB
Release files / strategyease_sdk-2.1.0.tar.gz
| Download URL | strategyease_sdk-2.1.0.tar.gz |
|---|---|
| Size | 35.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1ad2bff4392ba30f131f66c9919743236adace2fd4f2704a7cd786554eaa0b31
|
|
BLAKE2b-256 checksum How to use checksums |
672402838d63f1da788b6348a748615a6c00c5181aaf44f347f5b73386452056
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
|
Release files / strategyease_sdk-2.1.0-py2.py3-none-any.whl
| Download URL | strategyease_sdk-2.1.0-py2.py3-none-any.whl |
|---|---|
| Size | 98.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
e4494b6cd6c4f69286df03b3c4f6c9049201b545cec125e61f626ee9eddf7877
|
|
BLAKE2b-256 checksum How to use checksums |
2b527df0dd92959e18ea0f79c73c00c5fc1398d7f3179264f8ec8236f10b8b33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
|
Security for strategyease-sdk 2.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.