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