ctpbee

全面转向 Rust 开发 参见 FlashFunk

Showing:

Popularity

Downloads/wk

0

GitHub Stars

373

Maintenance

Last Commit

16d ago

Contributors

8

Package

Dependencies

0

License

MIT

Categories

Readme

ctpbee

bee bee .... for developer's trading ~

tiny but strong

ctpbee provide a micro core of trading, you can make trade and backtest in it.

环境设置

#  linux用户快速生成中文支持/ windows用户无须设置 
sudo ctpbee -auto generate

灵感起源

  • using ctp interface from vnpy

快速安装

# 源码安装 
git clone https://github.com/ctpbee/ctpbee && cd ctpbee && python3 setup.py install  

# pip源安装
pip3 install ctpbee

文档信息

点击阅读 document address

快速开始

from ctpbee import CtpBee
from ctpbee import CtpbeeApi

sta = CtpbeeApi("hello world")


@sta.route(handler="tick")
def on_tick(context, tick):
    print(tick)


@sta.route(handler="bar")
def on_tick(context, bar):
    print(bar)


app = CtpBee("ctpbee", __name__)
info = {
    "CONNECT_INFO": {
        "userid": "",
        "password": "",
        "brokerid": "",
        "md_address": "",
        "td_address": "",
        "appid": "",
        "auth_code": "",
        "product_info": ""
    },
    "INTERFACE": "ctp",
    "TD_FUNC": True,  # Open trading feature
}
app.config.from_mapping(info)  # loading config from dict object
app.add_extension(sta)
app.start() 

更多功能 请阅读document address

命令行运行截图

avatar

回测截图

支持多周期多合约回测

avatar

PR支持

Only Accept PR code to dev branch, please remember that !

For a high performance version

click the 👉 FlashFunk for more detail.

At last, have a good luck.

License

  • MIT

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100