From 86e0061f9cf211b98252a9e6b71d6c9801e4a16b Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期日, 18 十二月 2022 18:08:03 +0800
Subject: [PATCH] 撤单策略再次修改

---
 trade_data_manager.py |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/trade_data_manager.py b/trade_data_manager.py
index a6e40ba..8c5eafb 100644
--- a/trade_data_manager.py
+++ b/trade_data_manager.py
@@ -210,9 +210,6 @@
         count = self.__get_redis().get(key)
         return 0 if count is None else count
 
-
-
-
     def process_rate(self, code, rate, time_str):
         # 9鐐瑰崐涔嬪墠鐨勬暟鎹笉澶勭悊
         if int(time_str.replace(":", "")) < int("093000"):
@@ -238,6 +235,10 @@
         global_util.cuurent_prices[code] = (price, is_limit_up, round(time.time()))
         pass
 
+    # 鑾峰彇鐜颁环
+    def get_current_price(self, code):
+        return global_util.cuurent_prices.get(code)
+
     # 鐜颁环浠g爜鏁伴噺
     def save_current_price_codes_count(self, count):
         self.__save_current_price_codes_count(count)
@@ -253,6 +254,13 @@
         else:
             return time_seconds >= constant.UNDER_WATER_PRICE_TIME_AS_SECONDS
 
+    # 褰撳墠浠g爜鏄惁娑ㄥ仠
+    def current_is_limit_up(self, code):
+        data = self.get_current_price(code)
+        if data is None:
+            return None
+        return data[1]
+
 
 if __name__ == "__main__":
     processor = CodeActualPriceProcessor()

--
Gitblit v1.8.0