From 994079acd0ac30a32e2b0391881890be16b0afc0 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期二, 17 六月 2025 11:01:13 +0800 Subject: [PATCH] ‘功能完善 --- strategy/low_suction_strategy.py | 29 +++++++++++++++++++++++++++++ 1 files changed, 29 insertions(+), 0 deletions(-) diff --git a/strategy/low_suction_strategy.py b/strategy/low_suction_strategy.py index c6cd149..7ae9c54 100644 --- a/strategy/low_suction_strategy.py +++ b/strategy/low_suction_strategy.py @@ -5,6 +5,7 @@ import os import constant +from db.mysql_data_delegate import Mysqldb from strategy import strategy_variable @@ -191,6 +192,25 @@ fdatas[data[0]].append(data[2]) return fdatas + def export_all_big_order_deal(self, min_money=299e4): + """ + 鎵�鏈夊ぇ鍗曟垚浜わ紝鍖呭惈涔帮紝鍗� + @return: {"浠g爜":[浠g爜,鍗�/涔�, (涔板崟鍙�, 閲�, 閲戦, 鏃堕棿, 鏈�缁堟垚浜や环)]} + """ + + fdatas = {} + lines = self.__export_logs(f"logs/huaxin_local/l2/transaction_accurate_big_order.{self.day}.log") + if lines: + for line in lines: + line = line[line.find(" - ") + 3:].strip() + data = eval(line) + if data[2][2] < min_money: + continue + if data[0] not in fdatas: + fdatas[data[0]] = [] + fdatas[data[0]].append(data) + return fdatas + def export_big_sell_order_deal(self, min_money=299e4): """ 澶у崟鎴愪氦 @@ -267,6 +287,15 @@ data = eval(line) return data + def export_current_limit_up_records(self): + """ + 瀵煎嚭褰撴棩鍘嗗彶娑ㄥ仠 + @return: [(浠g爜, 浠g爜鍚嶇О, 娑ㄥ仠鍘熷洜, 娑ㄥ仠鏃堕棿, 楂樺害淇℃伅, 鑷敱娴侀�氬競鍊硷紝鏄惁鐐告澘)] + """ + results = Mysqldb().select_all( + f"select r.`_code`, r.`_code_name`, r.`_hot_block_name`, r.`_limit_up_time`, r.`_limit_up_high_info`, r.`_zylt_val`, r.`_open` from kpl_limit_up_record r where r._day = '{self.day}'") + return results + class LowSuctionDataManager: """ -- Gitblit v1.8.0