From 0b6850cb641bf704b7feb050a6e481553f639e06 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期四, 16 五月 2024 16:14:23 +0800 Subject: [PATCH] S重砸修改/大单重新定义 --- msg/buy_order_msg_manager.py | 30 ++++++++++++++++-------------- 1 files changed, 16 insertions(+), 14 deletions(-) diff --git a/msg/buy_order_msg_manager.py b/msg/buy_order_msg_manager.py index 436086a..d157ca7 100644 --- a/msg/buy_order_msg_manager.py +++ b/msg/buy_order_msg_manager.py @@ -1,6 +1,7 @@ # 鍗冲皢鎴愪氦 from code_attribute import gpcode_manager -from l2 import l2_data_source_util, l2_data_util +import l2 +import l2_data_util from l2.l2_data_util import L2DataUtil from log_module import async_log_util from log_module.log import logger_kp_msg @@ -10,7 +11,7 @@ # 鍗冲皢鎴愪氦 def almost_deal(code, real_order_index, trade_index): - total_datas = l2_data_util.local_today_datas.get(code) + total_datas = l2.l2_data_util.local_today_datas.get(code) if trade_index > real_order_index: return # 涓嬪崟3s杩囧悗鍐嶆彁閱� @@ -25,11 +26,11 @@ continue if val["num"] * float(val["price"]) < 5000: continue - left_count = l2_data_source_util.L2DataSourceUtils.get_limit_up_buy_no_canceled_count_v2(code, - i, - total_datas, - l2_data_util.local_today_canceled_buyno_map.get( - code)) + left_count = l2.l2_data_source_util.L2DataSourceUtils.get_limit_up_buy_no_canceled_count_v2(code, + i, + total_datas, + l2.l2_data_util.local_today_canceled_buyno_map.get( + code)) if left_count > 0: total_left_count += left_count total_left_money += val["num"] * left_count * float(val["price"]) * 100 @@ -37,7 +38,8 @@ if total_left_count <= 10: push_msg_manager.push_order_almost_deal(code, code_name, real_order_index, f"鍓╀綑锛歿total_left_count}绗�", ctype="count") - async_log_util.info(logger_kp_msg, f"{code}鍗冲皢鎴愪氦锛歵rade_index-{trade_index}锛宺eal_order_index-{real_order_index}锛屽墿浣欙細{total_left_count}绗旓紝缁撳熬锛歿total_datas[-1]['index']}") + async_log_util.info(logger_kp_msg, + f"{code}鍗冲皢鎴愪氦锛歵rade_index-{trade_index}锛宺eal_order_index-{real_order_index}锛屽墿浣欙細{total_left_count}绗旓紝缁撳熬锛歿total_datas[-1]['index']}") elif total_left_money < 1500 * 10000: push_msg_manager.push_order_almost_deal(code, code_name, real_order_index, @@ -50,7 +52,7 @@ def follow_not_enough(code, buy_exec_index, real_order_index): if buy_exec_index > real_order_index: return - total_datas = l2_data_util.local_today_datas.get(code) + total_datas = l2.l2_data_util.local_today_datas.get(code) # 涓嬪崟3s杩囧悗鍐嶆彁閱� if tool.trade_time_sub(total_datas[-1]["val"]["time"], total_datas[buy_exec_index]["val"]["time"]) <= 5: return @@ -67,11 +69,11 @@ if not l2_data_util.is_big_money(val): continue - canceled_data = l2_data_source_util.L2DataSourceUtils.get_limit_up_buy_canceled_data_v2(code, - i, - total_datas, - l2_data_util.local_today_canceled_buyno_map.get( - code)) + canceled_data = l2.l2_data_source_util.L2DataSourceUtils.get_limit_up_buy_canceled_data_v2(code, + i, + total_datas, + l2.l2_data_util.local_today_canceled_buyno_map.get( + code)) if not canceled_data: real_place_order_after_count += 1 real_place_order_after_money += val["num"] * float(val["price"]) * 100 -- Gitblit v1.8.0