From 3bec07f70237ca81990279a6b2f866a2adf70575 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期三, 27 八月 2025 22:28:42 +0800 Subject: [PATCH] L后撤单修改/L后重新囊括修改 --- l2/l2_transaction_data_processor.py | 22 ++++++++++++---------- 1 files changed, 12 insertions(+), 10 deletions(-) diff --git a/l2/l2_transaction_data_processor.py b/l2/l2_transaction_data_processor.py index e7fa00b..438b8e2 100644 --- a/l2/l2_transaction_data_processor.py +++ b/l2/l2_transaction_data_processor.py @@ -98,7 +98,7 @@ 缁熻澶у崟鎴愪氦 @param code: @param fdatas: 鏍煎紡锛歔(鏁版嵁鏈韩, 鏄惁涓诲姩涔�, 鏄惁娑ㄥ仠, 鎬绘垚浜ら, 涓嶅惈ms鏃堕棿锛屽惈ms鏃堕棿)] - @return: + @return: 澶т拱鍗曞垪琛�,澶у崠鍗曞垪琛� """ def statistic_big_buy_data(): @@ -167,6 +167,7 @@ else: buy_datas = statistic_big_buy_data() sell_datas = statistic_big_sell_data() + return buy_datas, sell_datas # L鎾ょ殑姣斾緥涓庝拱鍗栧ぇ鍗曟棤鐩存帴鍏崇郴浜� # if buy_datas or sell_datas: # buy_money = BigOrderDealManager().get_total_buy_money(code) @@ -230,8 +231,9 @@ _start_time = time.time() # 澶у崟缁熻 # cls.__statistic_thread_pool.submit(cls.statistic_big_order_infos, code, datas, order_begin_pos) + big_sell_list = [] try: - cls.statistic_big_order_infos(code, fdatas, order_begin_pos) + big_buy_list, big_sell_list = cls.statistic_big_order_infos(code, fdatas, order_begin_pos) except Exception as e: async_log_util.error(hx_logger_l2_debug, f"缁熻澶у崟鍑洪敊锛歿str(e)}") use_time_list.append(("缁熻澶у崟鏁版嵁", time.time() - _start_time)) @@ -254,17 +256,18 @@ _start_time = time.time() if is_placed_order: - - LCancelBigNumComputer().set_big_sell_order_info(code, big_sell_order_info) - # need_cancel, cancel_msg = SCancelBigNumComputer().set_big_sell_order_info_for_cancel(code, # big_sell_order_info, # order_begin_pos) need_cancel, cancel_msg = False, "" cancel_type = None - if need_cancel: - cancel_msg = f"S鎾�:{cancel_msg}" - cancel_type = trade_constant.CANCEL_TYPE_S + try: + can_cancel, cancel_data = LCancelBigNumComputer().add_big_sell_order_deal_list(code, big_sell_list) + if can_cancel: + need_cancel, cancel_msg = True, f"L鍚庡ぇ鍗栧崟鎴愪氦鍙犲姞瑙﹀彂鎾ゅ崟锛歿big_sell_list}" + except Exception as e: + async_log_util.error(logger_debug, f"L鍚庡ぇ鍗栧崟鎴愪氦鍙犲姞瑙﹀彂鎾ゅ崟:{str(e)}") + if not need_cancel: need_cancel, cancel_msg = FCancelBigNumComputer().need_cancel_for_p(code, order_begin_pos) @@ -373,7 +376,6 @@ big_sell_order_info = HuaXinSellOrderStatisticManager.statistic_continue_limit_up_sell_transaction_datas( code, fdatas, limit_up_price) - LCancelBigNumComputer().set_big_sell_order_info(code, big_sell_order_info) need_cancel, cancel_msg = False, "" cancel_type = None if not need_cancel: @@ -496,4 +498,4 @@ @classmethod def get_latest_transaction_data(cls, code): - return cls.__latest_transaction_data_dict.get(code) \ No newline at end of file + return cls.__latest_transaction_data_dict.get(code) -- Gitblit v1.8.0