Skip to content

Commit

Permalink
Merge pull request #246 from ctpbee/dev
Browse files Browse the repository at this point in the history
1.58
  • Loading branch information
somewheve committed Aug 13, 2023
2 parents 217b73d + 26c2929 commit e41ba4d
Show file tree
Hide file tree
Showing 8 changed files with 94 additions and 279 deletions.
23 changes: 14 additions & 9 deletions README.md
Expand Up @@ -108,10 +108,11 @@ if __name__ == '__main__':
- [x] k线生成
- [x] 回测报告生成
- [x] 自动运维
- [x] 多交易接口支持
- `ctp`
- `ctp_mini`
- `rohon`
- [x] 多交易接口支持
- `ctp`
- `ctp_mini`
- `rohon`
- `open_ctp`

更多相关信息, 请参阅[文档](http://docs.ctpbee.com)

Expand All @@ -130,16 +131,20 @@ if __name__ == '__main__':
Only Accept [PR](https://github.com/ctpbee/ctpbee/compare) code to `dev` branch, please remember that !


> 对于高频解决方案, 请 👉 [FlashFunk](https://github.com/HFQR/FlashFunk)
> 对于本地数据自动运维方案, 请👉 [Hive](https://github.com/ctpbee/hive)
## 免责声明
## 模拟测试 && 免责声明

本项目长期维护, 开源仅作爱好,本人不对代码产生的任何使用后果负责. 功能尽可能会保持稳定,
但是为了你的实盘账户着想,请先用`simnow`账户测试完善再上实盘!
但是为了你的实盘账户着想,请先用[simnow](https://www.simnow.com.cn/product.action)
或者[open_ctp](https://github.com/openctp/openctp)账户测试完善再上实盘!


> 关于如何对接open_ctp,请参阅此教程[click here](source/open_ctp.md)
## 遇到问题

如有问题, 请提issue, 会在1-2个工作日进行回复.
请提交issue或者于issue搜索关键字, 或者查阅[此处](http://docs.ctpbee.com/error.html)

## License

Expand Down
5 changes: 2 additions & 3 deletions ctpbee/app.py
Expand Up @@ -9,15 +9,15 @@
from ctpbee import __version__
from ctpbee.center import Center
from ctpbee.config import Config
from ctpbee.constant import Event, EVENT_TIMER
from ctpbee.constant import Event
from ctpbee.constant import Exchange
from ctpbee.context import _app_context_ctx
from ctpbee.exceptions import ConfigError
from ctpbee.helpers import end_thread
from ctpbee.helpers import find_package, refresh_query, graphic_pattern
from ctpbee.interface import Interface
from ctpbee.jsond import dumps
from ctpbee.level import CtpbeeApi, Action, Tool
from ctpbee.level import CtpbeeApi, Action
from ctpbee.log import VLogger
from ctpbee.looper.data import VessData
from ctpbee.looper.report import render_result
Expand Down Expand Up @@ -74,7 +74,6 @@ def __init__(self,
engine_method: Actor模型采用的底层的引擎
logger_class: logger类,可以自己定义
refresh: 是否自己主动查询账户 默认开启
sim: 是否进行模拟
"""
self.start_datetime = datetime.now()
self.basic_info = None
Expand Down
273 changes: 31 additions & 242 deletions ctpbee/date.py
Expand Up @@ -7830,248 +7830,37 @@
"2022-12-28",
"2022-12-29",
"2022-12-30",
'2023-01-03',
'2023-01-04',
'2023-01-05',
'2023-01-06',
'2023-01-09',
'2023-01-10',
'2023-01-11',
'2023-01-12',
'2023-01-13',
'2023-01-16',
'2023-01-17',
'2023-01-18',
'2023-01-19',
'2023-01-20',
'2023-01-30',
'2023-01-31',
'2023-02-01',
'2023-02-02',
'2023-02-03',
'2023-02-06',
'2023-02-07',
'2023-02-08',
'2023-02-09',
'2023-02-10',
'2023-02-13',
'2023-02-14',
'2023-02-15',
'2023-02-16',
'2023-02-17',
'2023-02-20',
'2023-02-21',
'2023-02-22',
'2023-02-23',
'2023-02-24',
'2023-02-27',
'2023-02-28',
'2023-03-01',
'2023-03-02',
'2023-03-03',
'2023-03-06',
'2023-03-07',
'2023-03-08',
'2023-03-09',
'2023-03-10',
'2023-03-13',
'2023-03-14',
'2023-03-15',
'2023-03-16',
'2023-03-17',
'2023-03-20',
'2023-03-21',
'2023-03-22',
'2023-03-23',
'2023-03-24',
'2023-03-27',
'2023-03-28',
'2023-03-29',
'2023-03-30',
'2023-03-31',
'2023-04-06',
'2023-04-07',
'2023-04-10',
'2023-04-11',
'2023-04-12',
'2023-04-13',
'2023-04-14',
'2023-04-17',
'2023-04-18',
'2023-04-19',
'2023-04-20',
'2023-04-21',
'2023-04-24',
'2023-04-25',
'2023-04-26',
'2023-04-27',
'2023-04-28',
'2023-05-02',
'2023-05-03',
'2023-05-04',
'2023-05-05',
'2023-05-08',
'2023-05-09',
'2023-05-10',
'2023-05-11',
'2023-05-12',
'2023-05-15',
'2023-05-16',
'2023-05-17',
'2023-05-18',
'2023-05-19',
'2023-05-22',
'2023-05-23',
'2023-05-24',
'2023-05-25',
'2023-05-26',
'2023-05-29',
'2023-05-30',
'2023-05-31',
'2023-06-01',
'2023-06-02',
'2023-06-05',
'2023-06-06',
'2023-06-07',
'2023-06-08',
'2023-06-09',
'2023-06-12',
'2023-06-13',
'2023-06-14',
'2023-06-15',
'2023-06-16',
'2023-06-19',
'2023-06-20',
'2023-06-21',
'2023-06-26',
'2023-06-27',
'2023-06-28',
'2023-06-29',
'2023-06-30',
'2023-07-03',
'2023-07-04',
'2023-07-05',
'2023-07-06',
'2023-07-07',
'2023-07-10',
'2023-07-11',
'2023-07-12',
'2023-07-13',
'2023-07-14',
'2023-07-17',
'2023-07-18',
'2023-07-19',
'2023-07-20',
'2023-07-21',
'2023-07-24',
'2023-07-25',
'2023-07-26',
'2023-07-27',
'2023-07-28',
'2023-07-31',
'2023-08-01',
'2023-08-02',
'2023-08-03',
'2023-08-04',
'2023-08-07',
'2023-08-08',
'2023-08-09',
'2023-08-10',
'2023-08-11',
'2023-08-14',
'2023-08-15',
'2023-08-16',
'2023-08-17',
'2023-08-18',
'2023-08-21',
'2023-08-22',
'2023-08-23',
'2023-08-24',
'2023-08-25',
'2023-08-28',
'2023-08-29',
'2023-08-30',
'2023-08-31',
'2023-09-01',
'2023-09-04',
'2023-09-05',
'2023-09-06',
'2023-09-07',
'2023-09-08',
'2023-09-11',
'2023-09-12',
'2023-09-13',
'2023-09-14',
'2023-09-15',
'2023-09-18',
'2023-09-19',
'2023-09-20',
'2023-09-21',
'2023-09-22',
'2023-09-25',
'2023-09-26',
'2023-09-27',
'2023-09-28',
'2023-10-09',
'2023-10-10',
'2023-10-11',
'2023-10-12',
'2023-10-13',
'2023-10-16',
'2023-10-17',
'2023-10-18',
'2023-10-19',
'2023-10-20',
'2023-10-23',
'2023-10-24',
'2023-10-25',
'2023-10-26',
'2023-10-27',
'2023-10-30',
'2023-10-31',
'2023-11-01',
'2023-11-02',
'2023-11-03',
'2023-11-06',
'2023-11-07',
'2023-11-08',
'2023-11-09',
'2023-11-10',
'2023-11-13',
'2023-11-14',
'2023-11-15',
'2023-11-16',
'2023-11-17',
'2023-11-20',
'2023-11-21',
'2023-11-22',
'2023-11-23',
'2023-11-24',
'2023-11-27',
'2023-11-28',
'2023-11-29',
'2023-11-30',
'2023-12-01',
'2023-12-04',
'2023-12-05',
'2023-12-06',
'2023-12-07',
'2023-12-08',
'2023-12-11',
'2023-12-12',
'2023-12-13',
'2023-12-14',
'2023-12-15',
'2023-12-18',
'2023-12-19',
'2023-12-20',
'2023-12-21',
'2023-12-22',
'2023-12-25',
'2023-12-26',
'2023-12-27',
'2023-12-28',
'2023-12-29'
'2023-01-03', '2023-01-04', '2023-01-05', '2023-01-06', '2023-01-09', '2023-01-10', '2023-01-11', '2023-01-12',
'2023-01-13', '2023-01-16', '2023-01-17', '2023-01-18', '2023-01-19', '2023-01-20', '2023-01-30', '2023-01-31',
'2023-02-01', '2023-02-02', '2023-02-03', '2023-02-06', '2023-02-07', '2023-02-08', '2023-02-09', '2023-02-10',
'2023-02-13', '2023-02-14', '2023-02-15', '2023-02-16', '2023-02-17', '2023-02-20', '2023-02-21', '2023-02-22',
'2023-02-23', '2023-02-24', '2023-02-27', '2023-02-28', '2023-03-01', '2023-03-02', '2023-03-03', '2023-03-06',
'2023-03-07', '2023-03-08', '2023-03-09', '2023-03-10', '2023-03-13', '2023-03-14', '2023-03-15', '2023-03-16',
'2023-03-17', '2023-03-20', '2023-03-21', '2023-03-22', '2023-03-23', '2023-03-24', '2023-03-27', '2023-03-28',
'2023-03-29', '2023-03-30', '2023-03-31', '2023-04-03', '2023-04-04', '2023-04-06', '2023-04-07', '2023-04-10',
'2023-04-11', '2023-04-12', '2023-04-13', '2023-04-14', '2023-04-17', '2023-04-18', '2023-04-19', '2023-04-20',
'2023-04-21', '2023-04-24', '2023-04-25', '2023-04-26', '2023-04-27', '2023-04-28', '2023-05-04', '2023-05-05',
'2023-05-08', '2023-05-09', '2023-05-10', '2023-05-11', '2023-05-12', '2023-05-15', '2023-05-16', '2023-05-17',
'2023-05-18', '2023-05-19', '2023-05-22', '2023-05-23', '2023-05-24', '2023-05-25', '2023-05-26', '2023-05-29',
'2023-05-30', '2023-05-31', '2023-06-01', '2023-06-02', '2023-06-05', '2023-06-06', '2023-06-07', '2023-06-08',
'2023-06-09', '2023-06-12', '2023-06-13', '2023-06-14', '2023-06-15', '2023-06-16', '2023-06-19', '2023-06-20',
'2023-06-21', '2023-06-26', '2023-06-27', '2023-06-28', '2023-06-29', '2023-06-30', '2023-07-03', '2023-07-04',
'2023-07-05', '2023-07-06', '2023-07-07', '2023-07-10', '2023-07-11', '2023-07-12', '2023-07-13', '2023-07-14',
'2023-07-17', '2023-07-18', '2023-07-19', '2023-07-20', '2023-07-21', '2023-07-24', '2023-07-25', '2023-07-26',
'2023-07-27', '2023-07-28', '2023-07-31', '2023-08-01', '2023-08-02', '2023-08-03', '2023-08-04', '2023-08-07',
'2023-08-08', '2023-08-09', '2023-08-10', '2023-08-11', '2023-08-14', '2023-08-15', '2023-08-16', '2023-08-17',
'2023-08-18', '2023-08-21', '2023-08-22', '2023-08-23', '2023-08-24', '2023-08-25', '2023-08-28', '2023-08-29',
'2023-08-30', '2023-08-31', '2023-09-01', '2023-09-04', '2023-09-05', '2023-09-06', '2023-09-07', '2023-09-08',
'2023-09-11', '2023-09-12', '2023-09-13', '2023-09-14', '2023-09-15', '2023-09-18', '2023-09-19', '2023-09-20',
'2023-09-21', '2023-09-22', '2023-09-25', '2023-09-26', '2023-09-27', '2023-09-28', '2023-10-09', '2023-10-10',
'2023-10-11', '2023-10-12', '2023-10-13', '2023-10-16', '2023-10-17', '2023-10-18', '2023-10-19', '2023-10-20',
'2023-10-23', '2023-10-24', '2023-10-25', '2023-10-26', '2023-10-27', '2023-10-30', '2023-10-31', '2023-11-01',
'2023-11-02', '2023-11-03', '2023-11-06', '2023-11-07', '2023-11-08', '2023-11-09', '2023-11-10', '2023-11-13',
'2023-11-14', '2023-11-15', '2023-11-16', '2023-11-17', '2023-11-20', '2023-11-21', '2023-11-22', '2023-11-23',
'2023-11-24', '2023-11-27', '2023-11-28', '2023-11-29', '2023-11-30', '2023-12-01', '2023-12-04', '2023-12-05',
'2023-12-06', '2023-12-07', '2023-12-08', '2023-12-11', '2023-12-12', '2023-12-13', '2023-12-14', '2023-12-15',
'2023-12-18', '2023-12-19', '2023-12-20', '2023-12-21', '2023-12-22', '2023-12-25', '2023-12-26', '2023-12-27',
'2023-12-28', '2023-12-29'
]


Expand Down
7 changes: 7 additions & 0 deletions ctpbee/record.py
Expand Up @@ -240,6 +240,13 @@ def get_main_contract_by_code(self, code: str):
else:
return now

@property
def order_amount(self):
"""
返回当日报单总数
"""
return len(self.orders)

def clear_all(self):
"""
为了避免数据越来越大,需要清空数据
Expand Down
21 changes: 0 additions & 21 deletions ctpbee/signals.py
@@ -1,24 +1,3 @@
"""
Notice : 神兽保佑 ,测试一次通过
//
// ┏┛ ┻━━━━━┛ ┻┓
// ┃       ┃
// ┃   ━   ┃
// ┃ ┳┛  ┗┳ ┃
// ┃       ┃
// ┃   ┻   ┃
// ┃       ┃
// ┗━┓   ┏━━━┛
// ┃   ┃ Author: somewheve
// ┃   ┃ Datetime: 2019/7/6 下午2:13 ---> 无知即是罪恶
// ┃   ┗━━━━━━━━━┓
// ┃        ┣┓
// ┃     ┏┛
// ┗━┓ ┓ ┏━━━┳ ┓ ┏━┛
// ┃ ┫ ┫ ┃ ┫ ┫
// ┗━┻━┛ ┗━┻━┛
//
"""
from uuid import uuid4

from blinker import signal, NamedSignal
Expand Down

0 comments on commit e41ba4d

Please sign in to comment.