From 4a6dc322665e8977b8d8408a3f4f4644d4ef7ec8 Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期五, 12 四月 2024 12:35:23 +0800
Subject: [PATCH] 新版深证下单完善

---
 l2/place_order_single_data_manager.py |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/l2/place_order_single_data_manager.py b/l2/place_order_single_data_manager.py
index 0446460..72e8e57 100644
--- a/l2/place_order_single_data_manager.py
+++ b/l2/place_order_single_data_manager.py
@@ -47,7 +47,7 @@
         if index is None:
             return
         cls.__latest_limit_up_sell_order_no_index_dict[code].pop(order_no)
-        del cls.__latest_limit_up_sell_list_dict[code][index]
+        cls.__latest_limit_up_sell_list_dict[code].pop(index)
 
     @classmethod
     def process_passive_limit_up_sell_data(cls, data):
@@ -77,12 +77,15 @@
             if not sell_list:
                 return
             sell_info = sell_list[-1]
-            l2_log.info(code, logger_l2_trade_buy, f"鏈�杩戞定鍋滃崠锛歿sell_info['val']['orderNo']}")
-            if sell_no == sell_info['val']['orderNo'] and sell_info["val"]["num"] == cls.__latest_sell_data[code][
-                1] // 100:
+            sell_info_num = sell_info['val']['num']
+            deal_num = cls.__latest_sell_data[code][1]//100
+
+            l2_log.info(code, logger_l2_trade_buy, f"鏈�杩戞定鍋滃崠锛歿sell_info['val']['orderNo']} 鍗栭噺锛歿sell_info_num} 鎴愪氦閲忥細{deal_num}")
+            if sell_no == sell_info['val']['orderNo'] and sell_info_num == deal_num:
                 # 鎴愪氦瀹屾垚
                 L2TradeSingleDataManager.set_latest_sell_data(code, data)
-                logger_l2_trade_buy.info(f"{code}#鎵惧埌鏈�杩戠殑琚姩娑ㄥ仠鍗栧崟鏁版嵁锛歿data['val']['orderNo']}, 鍙互瑙﹀彂涓嬪崟")
+                l2_log.info(code, logger_l2_trade_buy,f"{code}#鎵惧埌鏈�杩戠殑琚姩娑ㄥ仠鍗栧崟鏁版嵁锛歿sell_info['val']['orderNo']}, 鍙互瑙﹀彂涓嬪崟")
+
                 # l2_log.info(code, logger_l2_trade_buy, f"鎵惧埌鏈�杩戠殑琚姩娑ㄥ仠鍗栧崟鏁版嵁锛歿data['val']['orderNo']}, 鍙互瑙﹀彂涓嬪崟")
         except Exception as e:
             logger_debug.exception(e)
@@ -124,6 +127,7 @@
         @param active_data: 涓诲姩鍗栨垚浜ら�愮瑪
         @return:
         """
+        l2_log.info(code, logger_l2_trade_buy, f"琚姩鍗栧彉涓诲姩鍗栵細{passive_data} => {active_data}")
         deal_time = l2_huaxin_util.convert_time(passive_data[3], True)
         # 鐢熸晥鏃堕棿鍦�1s浠ュ唴
         cls.__latest_sell_active_deal_data_dict[code] = (

--
Gitblit v1.8.0