Administrator
2023-11-17 061204832c6eb71d5583fa8ebdd41479100b6b54
l2/transaction_progress.py
@@ -191,9 +191,10 @@
        if not last_info or last_info[0] != index:
            if last_info and total_datas:
                val = total_datas[last_info[0]]['val']
                rate = round(val["num"] * float(val["price"]) * 100 / (time.time() - last_info[1]))
                # 成交速率
                self.trade_speed_cache[code] = rate
                if time.time() - last_info[1] > 0:
                    rate = round(val["num"] * float(val["price"]) * 100 / (time.time() - last_info[1]))
                    # 成交速率
                    self.trade_speed_cache[code] = rate
            self.latest_buy_progress_index_cache[code] = (index, time.time())
        self.__save_buy_progress_index(code, index, False)