Administrator
2022-12-18 86e0061f9cf211b98252a9e6b71d6c9801e4a16b
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)
    # 现价代码数量
    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
    # 当前代码是否涨停
    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()