Skip to main content

implement backtesting and trading of quantitative strategy

Project description

btpy

介绍

  • python api to binance, okx

安装方法

  1. 下载项目:
    • 方法一:从github上克隆 git clone https://gitee.com/yunjinqi/btpy.git
    • 方法二:安装包解压到本地
  2. 安装依赖: pip install -r ./btpy/requirements.txt
  3. 编译安装项目: 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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bt_api_py-0.13-cp311-cp311-macosx_11_0_arm64.whl (322.8 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Hashes for bt_api_py-0.13.tar.gz
Algorithm Hash digest
SHA256 2e8c52d64b6dafb8045d3dd0e6f929d50b3d21861f67fa3020d0a1ba0f56f50a
MD5 5042f770fa1fb2a87503d284946760ff
BLAKE2b-256 51879515f778cd40fafe63535f0d4e0185db1fc0911802e10ce6917ec580af2a

See more details on using hashes here.

File details

Details for the file bt_api_py-0.13-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for bt_api_py-0.13-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 50a8201c9f76c23c33fa6df72023b679ae3e6530ae2868019405c4c19b78633a
MD5 c05d9f94f91248561ea0ffcf738f3cf1
BLAKE2b-256 97e1ad1ea3711589f4af6436e293ec0bfdd9e5fbf1f79bbfcfeccf6a20579500

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page