| | |
| | | import json |
| | | |
| | | import constant |
| | | from log_module.log import logger_common |
| | | from log_module import async_log_util |
| | | from log_module.log import logger_common, logger_k_bars |
| | | from strategy import data_cache |
| | | |
| | | # 引入基础算法模块 |
| | |
| | | # 将转换后的JSON字符串写入文件 |
| | | with open(constant.K_BARS_PATH, 'w', encoding='utf-8') as f: |
| | | f.write(json_data) |
| | | async_log_util.info(logger_k_bars, json_data) |
| | | except Exception as error: |
| | | print(f"An error occurred while converting the data to JSON: {error}") |
| | | logger.info(f"标的个股历史k线写完了!{tool.get_now_time_str()}") |