api/outside_api_command_callback.py
@@ -545,12 +545,14 @@ # 获取今日K线的更新数量 try: dates = HistoryKDatasUtils.get_latest_trading_date_cache(5) logger_debug.info(f"获取到的交易日:{dates}") latest_trading_date = None if dates: latest_trading_date = dates[0] if latest_trading_date is None: raise Exception("没有获取到上一个交易日的日期") # 4点之后改为获取今日的数据 if tool.get_now_time_as_int()>160000: latest_trading_date = tool.get_now_date_str() codes = HistoryKDataManager().get_history_bars_codes(latest_trading_date) count = len(codes) logger_debug.info(f"K线代码数量:{count}")