Administrator
2024-01-10 fa585f59d291097b1cefb2f58cead999f042d169
l2/transaction_progress.py
@@ -188,6 +188,8 @@
    # 设置交易进度
    def set_traded_index(self, code, index, total_datas = None):
        last_info = self.latest_buy_progress_index_cache.get(code)
        # 交易进度是否改变
        traded_index_changed = False
        if not last_info or last_info[0] != index:
            if last_info and total_datas:
                val = total_datas[last_info[0]]['val']
@@ -196,7 +198,9 @@
                    # 成交速率
                    self.trade_speed_cache[code] = rate
            self.latest_buy_progress_index_cache[code] = (index, time.time())
            traded_index_changed = True
        self.__save_buy_progress_index(code, index, False)
        return traded_index_changed
    # 获取成交速率
    def get_trade_speed(self, code):