| | |
| | | import os |
| | | import threading |
| | | |
| | | import constant |
| | | |
| | | from api.outside_api_command_manager import ActionCallback |
| | | from huaxin_client import l1_subscript_codes_manager |
| | | from huaxin_client.client_network import SendResponseSkManager |
| | | from strategy import strategy_params_settings, env_info |
| | | from strategy import strategy_params_settings, env_info, strategy_manager |
| | | from strategy.env_info import RealTimeEnvInfo |
| | | from strategy.strategy_variable_factory import DataLoader |
| | | from third_data.history_k_data_manager import TradeDateManager |
| | |
| | | threading.Thread(target=lambda: update(), daemon=True).start() |
| | | return {"code": 0} |
| | | |
| | | def __on_init_data(self): |
| | | try: |
| | | strategy_manager.low_suction_strtegy.load_data() |
| | | return {"code": 0} |
| | | except Exception as e: |
| | | logging.exception(e) |
| | | return {"code": 1, "msg": str(e)} |
| | | |
| | | def OnCommonRequest(self, client_id, request_id, data): |
| | | ctype = data["ctype"] |
| | | result_json = {} |
| | |
| | | elif ctype == 'update_kpl_code_jx_blocks_datas': |
| | | # 更新开盘啦精选数据 |
| | | result_json = self.__on_update_kpl_code_jx_blocks_datas() |
| | | elif ctype == 'init_datas': |
| | | # 初始化数据 |
| | | result_json = self.__on_init_data() |
| | | self.send_response(result_json, client_id, request_id) |