implement backtesting and trading of quantitative strategy
Project description
btpy
介绍
- python api to binance, okx
安装方法
- 下载项目:
- 方法一:从github上克隆
git clone https://gitee.com/yunjinqi/btpy.git - 方法二:安装包解压到本地
- 方法一:从github上克隆
- 安装依赖:
pip install -r ./btpy/requirements.txt - 编译安装项目:
pip install ./btpy
运行测试
- 首先在btpy/configs文件夹下新建一个account_config.yaml用于配置账户信息,
- 格式参考account_config_example.yaml
- 为了跑通测试,需要binance,okx交易所的api, 并且需要在现货账户和合约账户里面都有10USDT
- 在btpy文件夹下,运行命令:
- pytest tests -n 4 # 使用4个cpu运行测试
- pytest tests -n 4 --picked # 使用4个CPU仅仅测试新的未通过测试的test
使用方法
- 待完善
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bt_api_py-0.13.tar.gz
(258.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bt_api_py-0.13.tar.gz.
File metadata
- Download URL: bt_api_py-0.13.tar.gz
- Upload date:
- Size: 258.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e8c52d64b6dafb8045d3dd0e6f929d50b3d21861f67fa3020d0a1ba0f56f50a
|
|
| MD5 |
5042f770fa1fb2a87503d284946760ff
|
|
| BLAKE2b-256 |
51879515f778cd40fafe63535f0d4e0185db1fc0911802e10ce6917ec580af2a
|
File details
Details for the file bt_api_py-0.13-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: bt_api_py-0.13-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 322.8 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50a8201c9f76c23c33fa6df72023b679ae3e6530ae2868019405c4c19b78633a
|
|
| MD5 |
c05d9f94f91248561ea0ffcf738f3cf1
|
|
| BLAKE2b-256 |
97e1ad1ea3711589f4af6436e293ec0bfdd9e5fbf1f79bbfcfeccf6a20579500
|