| | |
| | | from l2.huaxin import huaxin_target_codes_manager |
| | | from third_data import block_info |
| | | from third_data.history_k_data_util import HistoryKDatasUtils, JueJinApi |
| | | from third_data.kpl_data_manager import KPLDataManager |
| | | from third_data.kpl_util import KPLDataType |
| | | from trade import trade_manager, trade_huaxin |
| | | |
| | | from trade.huaxin import huaxin_trade_api, huaxin_trade_record_manager, \ |
| | |
| | | except Exception as e: |
| | | return_str = json.dumps( |
| | | {"code": 0, "msg": str(e)}) |
| | | elif type_ == 'get_env_info': |
| | | # 获取环境信息 |
| | | fdata = {} |
| | | try: |
| | | date = JueJinApi.get_previous_trading_date(tool.get_now_date_str()) |
| | | if date: |
| | | fdata["juejin"] = 1 |
| | | except Exception as e: |
| | | fdata["juejin"] = 0 |
| | | fdata["kpl"] = {} |
| | | # 获取开盘啦数据 |
| | | kpl_types = [KPLDataType.LIMIT_UP.value, KPLDataType.JINGXUAN_RANK.value, |
| | | KPLDataType.INDUSTRY_RANK.value] |
| | | for kpl_type in kpl_types: |
| | | if kpl_type in KPLDataManager.kpl_data_update_info: |
| | | fdata["kpl"][kpl_type] = KPLDataManager.kpl_data_update_info.get(kpl_type) |
| | | |
| | | return_str = json.dumps( |
| | | {"code": 0, "data": fdata, "msg": ""}) |
| | | # 查询委托列表 |
| | | elif type_ == 'test': |
| | | # 卖出 |