From bea977458173f2e60971bad2d6f1e3183070c5ca Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期一, 21 十月 2024 10:21:56 +0800 Subject: [PATCH] bug修改 --- l2/l2_data_manager_new.py | 22 ++++++++++++---------- 1 files changed, 12 insertions(+), 10 deletions(-) diff --git a/l2/l2_data_manager_new.py b/l2/l2_data_manager_new.py index 4f35ed7..c47cea8 100644 --- a/l2/l2_data_manager_new.py +++ b/l2/l2_data_manager_new.py @@ -600,13 +600,14 @@ def l_cancel(_buy_single_index, _buy_exec_index): _start_time = round(t.time() * 1000) try: - b_need_cancel, b_cancel_data, extra_msg = cls.__LCancelBigNumComputer.need_cancel(code, - _buy_exec_index, - start_index, - end_index, total_data, - is_first_code) + b_need_cancel, b_cancel_data, extra_msg, b_cancel_type = cls.__LCancelBigNumComputer.need_cancel(code, + _buy_exec_index, + start_index, + end_index, + total_data, + is_first_code) if b_need_cancel and b_cancel_data: - return b_cancel_data, f"L鎾�({extra_msg})" + return b_cancel_data, f"L鎾�({extra_msg})", b_cancel_type except Exception as e: async_log_util.error(logger_l2_error, f"L鎾ゅ嚭閿� 鍙傛暟锛歜uy_single_index-{_buy_single_index} buy_exec_index-{_buy_exec_index} 閿欒鍘熷洜锛歿str(e)}") @@ -615,7 +616,7 @@ finally: # l2_data_log.l2_time(code, round(t.time() * 1000) - _start_time, "宸蹭笅鍗�-L鎾ゅぇ鍗曡绠�") pass - return None, "" + return None, "", None # G鎾� def g_cancel(_buy_single_index, _buy_exec_index): @@ -680,8 +681,8 @@ cancel_type = trade_constant.CANCEL_TYPE_G # 渚濇澶勭悊 if not cancel_data: - cancel_data, cancel_msg = l_cancel(order_begin_pos.buy_single_index, order_begin_pos.buy_exec_index) - cancel_type = trade_constant.CANCEL_TYPE_L + cancel_data, cancel_msg, cancel_type = l_cancel(order_begin_pos.buy_single_index, + order_begin_pos.buy_exec_index) # B鎾� if not cancel_data: cancel_data, cancel_msg = b_cancel(order_begin_pos.buy_single_index, order_begin_pos.buy_exec_index) @@ -1367,7 +1368,8 @@ if cancel_type != trade_constant.CANCEL_TYPE_HUMAN: # 鏄惁鏄氦鏄撻槦鍒楄Е鍙� # 鎵叆涓嬪崟鍙湁L鎾よ兘鎾ゅ崟 - if order_begin_pos and order_begin_pos.mode == OrderBeginPosInfo.MODE_RADICAL and cancel_type not in {trade_constant.CANCEL_TYPE_L_DOWN}: + if order_begin_pos and order_begin_pos.mode == OrderBeginPosInfo.MODE_RADICAL and cancel_type not in { + trade_constant.CANCEL_TYPE_L_DOWN, trade_constant.CANCEL_TYPE_L}: l2_log.cancel_debug(code, "鎾ゅ崟涓柇锛屽師鍥狅細{}", "鎵叆涓嬪崟涓嶆槸L鎾�") return False # 鍔犵豢鍙湁L鎾�/浜烘挙鐢熸晥 -- Gitblit v1.8.0