bothpy-ctp-6.6.7.4
توضیحات
CTP gateway for bothpy quant trading framework.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | POSIX :: Linux |
| نام فایل | bothpy-ctp-6.6.7.4 |
| نام | bothpy-ctp |
| نسخه کتابخانه | 6.6.7.4 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | - |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/bothpy-ctp/ |
| مجوز | MIT |
## 说明
基于CTP期货版的6.6.7接口封装开发,接口中自带的是【穿透式实盘环境】的dll文件。
由 vnpy_ctp 修改而来
## 打包
```
python setup.py bdist_wheel
```
需要进行C++编译,因此在执行上述命令之前请确保已经安装了【Visual Studio(Windows)】、【GCC(Linux)】、【XCode(Mac)】编译器。
## 发布
先安装一下 twine:
```
python -m pip install twine
twine upload dist/*
```
没有账户去注册一个 https://pypi.org/
## 安装
直接使用pip命令:
```
pip install bothpy_ctp
```
## 使用
以脚本方式启动(script/run.py):
```
from bothpy.event import EventEngine
from bothpy.trader.engine import MainEngine
from bothpy.trader.ui import MainWindow, create_qapp
from bothpy_ctp import CtpGateway
def main():
"""主入口函数"""
qapp = create_qapp()
event_engine = EventEngine()
main_engine = MainEngine(event_engine)
main_engine.add_gateway(CtpGateway)
main_window = MainWindow(main_engine, event_engine)
main_window.showMaximized()
qapp.exec()
if __name__ == "__main__":
main()
```
نیازمندی
| مقدار | نام |
|---|---|
| - | importlib-metadata |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7 | Python |
نحوه نصب
نصب پکیج whl bothpy-ctp-6.6.7.4:
pip install bothpy-ctp-6.6.7.4.whl
نصب پکیج tar.gz bothpy-ctp-6.6.7.4:
pip install bothpy-ctp-6.6.7.4.tar.gz