From 2fa1ab8dd2ae6f9596ccd018ef5e8b812347dd8d Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期四, 07 三月 2024 17:49:56 +0800 Subject: [PATCH] 精简L2过滤数据/快速成交守护时间修改 --- huaxin_client/l2_client.py | 18 +----------------- 1 files changed, 1 insertions(+), 17 deletions(-) diff --git a/huaxin_client/l2_client.py b/huaxin_client/l2_client.py index 2e96339..003f3c5 100644 --- a/huaxin_client/l2_client.py +++ b/huaxin_client/l2_client.py @@ -186,18 +186,6 @@ return data_json[1] return [] - def set_code_special_watch_volume(self, code, volume): - # 鏈夋晥鏈熶负3s - # self.special_code_volume_for_order_dict[code] = (volume, time.time() + 3) - d = self.codes_volume_and_price_dict.get(code) - if d: - min_volume, limit_up_price, special_price, buy_volume = d[0], d[1], d[2], d[3] - self.l2_data_upload_manager.set_order_fileter_condition(code, min_volume, limit_up_price, special_price, - buy_volume, - {volume, constant.SHADOW_ORDER_VOLUME}, - time.time() + 3) - huaxin_l2_log.info(logger_local_huaxin_l2_subscript, f"璁剧疆涓嬪崟閲忕洃鍚細{code}-{volume}") - def OnFrontConnected(self): print("OnFrontConnected") logger_system.info(f"l2_client OnFrontConnected 绾跨▼ID:{tool.get_thread_id()}") @@ -546,11 +534,7 @@ value = value.decode("utf-8") data = json.loads(value) _type = data["type"] - if _type == "listen_volume": - volume = data["data"]["volume"] - code = data["data"]["code"] - spi.set_code_special_watch_volume(code, volume) - elif _type == "l2_cmd": + if _type == "l2_cmd": __start_time = time.time() # 绾跨▼姹� __l2_cmd_thread_pool.submit( -- Gitblit v1.8.0