Administrator
2024-12-31 76010afecab7ec83f480bca21cacf619b0279b5b
api/outside_api_command_callback.py
@@ -487,7 +487,7 @@
        try:
            fdata = {}
            try:
                date = JueJinApi.get_previous_trading_date(tool.get_now_date_str())
                date = HistoryKDatasUtils.get_trading_dates(tool.date_sub(tool.get_now_date_str(), 10) ,tool.get_now_date_str())
                if date:
                    fdata["juejin"] = 1
            except Exception as e:
@@ -550,8 +550,12 @@
                    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}")
                fdata["today_history_k_bar_count"] = count
            except Exception as e:
                logger_debug.exception(e)