From 8821049f3faee04e03f5535c6259d07bfb8b6433 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期四, 24 七月 2025 18:11:11 +0800 Subject: [PATCH] 订阅规则修改/增加新的外部接口/删除不必要的debug日志 --- cancel_strategy/s_l_h_cancel_strategy.py | 20 +++++++++++++++----- 1 files changed, 15 insertions(+), 5 deletions(-) diff --git a/cancel_strategy/s_l_h_cancel_strategy.py b/cancel_strategy/s_l_h_cancel_strategy.py index 6c4c078..6ec68ab 100644 --- a/cancel_strategy/s_l_h_cancel_strategy.py +++ b/cancel_strategy/s_l_h_cancel_strategy.py @@ -703,6 +703,7 @@ self.l_down = {} def set_l_down(self, code, rate): + async_log_util.info(logger_l2_l_cancel, f"浜轰负淇敼L鍚庢挙鍗曟瘮渚�:{code}-{rate}") self.l_down[code] = rate def get_l_down(self, code): @@ -1559,7 +1560,11 @@ l2_log.l_cancel_debug(code, "灏哃2鍚庡悗鍗婃澶囩敤澶у崟鍔犲叆璁$畻鍑洪敊锛歿}", str(e)) # 璁$畻鐩戝惉鐨勬�绘潯鏁� total_num = 0 + # 瓒呭ぇ鍗曠殑鎵嬫暟 + super_big_num_thresold = int(2e7/gpcode_manager.get_limit_up_price_as_num(code)/100) max_num, max_num_count = 0, 0 + + thresh_hold_rate, must_buy, cancel_rate_info = LCancelRateManager.get_cancel_rate(code) for wi in watch_indexes: if str(wi) in after_place_order_index_dict: @@ -1573,8 +1578,11 @@ total_num += total_data[wi]["val"]["num"] * ( 10 - after_place_order_index_by_dict[str(wi)]) // 10 continue - - total_num += total_data[wi]["val"]["num"] * total_data[wi]["re"] + # 瓒呰繃瓒呭ぇ鍗曞氨绠楄秴澶у崟 + if total_data[wi]["val"]["num"] < super_big_num_thresold: + total_num += total_data[wi]["val"]["num"] + else: + total_num += super_big_num_thresold if total_data[wi]["val"]["num"] > max_num: max_num = total_data[wi]["val"]["num"] max_num_count = 1 @@ -1666,7 +1674,7 @@ total_num = 0 max_num, max_num_count = 0, 0 thresh_hold_rate, must_buy, cancel_rate_info = LCancelRateManager.get_cancel_rate(code) - + super_big_num_thresold = int(2e7 / gpcode_manager.get_limit_up_price_as_num(code) / 100) for wi in watch_indexes: if str(wi) in after_place_order_index_dict: # 濡傛灉鍔犵孩灏遍渶瑕佽绠楀垎姣� @@ -1679,8 +1687,10 @@ total_num += total_data[wi]["val"]["num"] * ( 10 - after_place_order_index_by_dict[str(wi)]) // 10 continue - - total_num += total_data[wi]["val"]["num"] * total_data[wi]["re"] + if total_data[wi]["val"]["num"] < super_big_num_thresold: + total_num += total_data[wi]["val"]["num"] + else: + total_num += super_big_num_thresold if total_data[wi]["val"]["num"] > max_num: max_num = total_data[wi]["val"]["num"] max_num_count = 1 -- Gitblit v1.8.0