From 832d70d984316e43048a84ad61d0c8a12c319993 Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期四, 11 四月 2024 18:47:20 +0800
Subject: [PATCH] 深证买入方式改造

---
 l2/l2_transaction_data_processor.py |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/l2/l2_transaction_data_processor.py b/l2/l2_transaction_data_processor.py
index 81a52c0..2a122f2 100644
--- a/l2/l2_transaction_data_processor.py
+++ b/l2/l2_transaction_data_processor.py
@@ -1,6 +1,7 @@
 import logging
 import time
 
+from code_attribute import gpcode_manager
 from l2 import l2_data_util, l2_data_manager, transaction_progress
 from l2.cancel_buy_strategy import FCancelBigNumComputer, LCancelBigNumComputer, LCancelRateManager, \
     GCancelBigNumComputer, SCancelBigNumComputer, HourCancelBigNumComputer
@@ -51,9 +52,11 @@
 
             big_sell_order_info = None
             try:
+                limit_up_price = gpcode_manager.get_limit_up_price(code)
+                if limit_up_price:
+                    limit_up_price = round(float(limit_up_price), 2)
                 # 缁熻鍗栧崟
-                big_sell_order_info = HuaXinSellOrderStatisticManager.add_transaction_datas(code, datas,
-                                                                                            order_begin_pos.buy_exec_index if is_placed_order else None)
+                big_sell_order_info = HuaXinSellOrderStatisticManager.add_transaction_datas(code, datas, limit_up_price)
                 need_cancel, cancel_msg = SCancelBigNumComputer().set_big_sell_order_info_for_cancel(code,
                                                                                                      big_sell_order_info,
                                                                                                      order_begin_pos)
@@ -108,7 +111,7 @@
                                                            total_datas)
 
                 if order_begin_pos and order_begin_pos.buy_exec_index and order_begin_pos.buy_exec_index > -1:
-                    cancel_result = FCancelBigNumComputer().need_cancel_for_deal_fast(code,buy_progress_index)
+                    cancel_result = FCancelBigNumComputer().need_cancel_for_deal_fast(code, buy_progress_index)
                     if cancel_result[0]:
                         L2TradeDataProcessor.cancel_buy(code, cancel_result[1])
                     HourCancelBigNumComputer().set_transaction_index(code, order_begin_pos.buy_single_index,
@@ -126,4 +129,3 @@
             use_time = int((time.time() - __start_time) * 1000)
             if use_time > 10:
                 async_log_util.info(hx_logger_l2_upload, f"{code}澶勭悊鎴愪氦鐢ㄦ椂锛歿use_time}")
-

--
Gitblit v1.8.0