| | |
| | | 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) |
| | | |