From a505cbca2d80bc533fbb27e32b447311fcb15eec Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期五, 14 二月 2025 15:48:27 +0800 Subject: [PATCH] bug修复 --- l2/l2_limitup_sell_data_manager.py | 8 ++++---- l2/huaxin/huaxin_delegate_postion_manager.py | 2 +- servers/huaxin_trade_server.py | 4 +++- l2/l2_data_manager_new.py | 2 ++ 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/l2/huaxin/huaxin_delegate_postion_manager.py b/l2/huaxin/huaxin_delegate_postion_manager.py index 629741a..49e77a9 100644 --- a/l2/huaxin/huaxin_delegate_postion_manager.py +++ b/l2/huaxin/huaxin_delegate_postion_manager.py @@ -216,7 +216,7 @@ # 鏈�澶х殑鏃堕棿宸�,鏈�澶х殑绱㈠紩宸�, 鏁版嵁 # 娣辫瘉涓庢墽琛屼綅缃浉宸椂闂�>=10ms浠ヤ笂锛屼笂璇佷笌鎵ц浣嶇疆鐩稿樊鏃堕棿>=100ms浠ヤ笂 data_ = temp_volumes_info_list[0][2] - MIN_SPCE_MS = 100 if tool.is_sh_code(code) else 10 + MIN_SPCE_MS = 10 if tool.is_sh_code(code) else 10 if tool.trade_time_sub_with_ms(L2DataUtil.get_time_with_ms(data_["val"]), exec_time_with_ms) < MIN_SPCE_MS: continue match_list.append((max_sub_time, max_sub_index, data_)) diff --git a/l2/l2_data_manager_new.py b/l2/l2_data_manager_new.py index c5606b7..c9d0c38 100644 --- a/l2/l2_data_manager_new.py +++ b/l2/l2_data_manager_new.py @@ -2012,6 +2012,8 @@ if not constant.CAN_RADICAL_BUY_AT_LIMIT_UP and code in RadicalBuyDealCodesManager.buy_by_l2_delegate_expire_time_dict: RadicalBuyDealCodesManager.buy_by_l2_delegate_expire_time_dict.pop(code) return True, result[1], radical_data[2], radical_data[4], result[3] + else: + async_log_util.info(logger_l2_not_buy_reasons, f"{code}#{result[2]}") return result @classmethod diff --git a/l2/l2_limitup_sell_data_manager.py b/l2/l2_limitup_sell_data_manager.py index 179b51d..6fe4bbd 100644 --- a/l2/l2_limitup_sell_data_manager.py +++ b/l2/l2_limitup_sell_data_manager.py @@ -85,7 +85,7 @@ order_no_set = set() limit_up_active_buy_datas = [] for d in datas: - if d[1] != limit_up_price: + if abs(d[1] - limit_up_price) > 0.001: continue # 鏄惁鏈夋定鍋滀富鍔ㄤ拱鎴愪氦 if d[6] < d[7]: @@ -129,13 +129,13 @@ if __name__ == "__main__": # 娴嬭瘯娑ㄥ仠鎬诲崠鍚冩帀鐨勬儏鍐� - code = "000503" + code = "300253" datas = log_export.load_huaxin_l2_sell_deal_list(code).get(code) print(datas) deal_datas = [] deal_order_nos = set() for i in range(len(datas)): - if 102839 <= int(datas[i][0].replace(":", "")) <= 102845: + if 133320 <= int(datas[i][0].replace(":", "")) <= 142039: deal_datas.append(datas[i]) for x in deal_datas: for xx in x[1]: @@ -147,7 +147,7 @@ fdatas = [] for x in datas: # if int("101821") < int(x[0].replace(":", "")) < int("102841"): - if 20770358 >= x[2][0] >= 18860519: + if 42886361 >= x[2][0] >= 35522478: fdatas.append(x) delegate_order_nos = set() total_delegate = 0 diff --git a/servers/huaxin_trade_server.py b/servers/huaxin_trade_server.py index 8cf5f80..7d2203c 100644 --- a/servers/huaxin_trade_server.py +++ b/servers/huaxin_trade_server.py @@ -37,7 +37,7 @@ from log_module import async_log_util, log_export from log_module.log import hx_logger_contact_debug, hx_logger_trade_callback, \ hx_logger_l2_orderdetail, hx_logger_l2_market_data, logger_l2_g_cancel, logger_debug, \ - logger_system, logger_trade, logger_l2_radical_buy + logger_system, logger_trade, logger_l2_radical_buy, logger_l2_not_buy_reasons from third_data import block_info, kpl_data_manager, history_k_data_manager, huaxin_l1_data_manager, kpl_api, kpl_util from third_data.code_plate_key_manager import KPLCodeJXBlockManager, CodePlateKeyBuyManager, RealTimeKplMarketData, \ KPLPlateForbiddenManager @@ -749,6 +749,8 @@ result_cache = (time.time() + 3, radical_result) self.__radical_buy_by_blocks_result_cache[code] = result_cache RadicalBuyDealCodesManager().set_code_blocks(code, radical_result[0]) + if not radical_result[0]: + async_log_util.info(logger_l2_not_buy_reasons, f"{code}#{radical_result[1]}") # 鍙栫紦瀛� result = result_cache[1] if result[0]: -- Gitblit v1.8.0