| | |
| | | import time |
| | | |
| | | import constant |
| | | from code_attribute import gpcode_manager |
| | | from l2 import l2_data_manager_new |
| | | from l2.huaxin import huaxin_target_codes_manager |
| | | from log_module.log import hx_logger_l2_upload, hx_logger_contact_debug, hx_logger_trade_callback, \ |
| | |
| | | trade_data_request_queue.put_nowait({"type": "position_list"}) |
| | | return_str = json.dumps( |
| | | {"code": 0, "data": {}, "msg": ""}) |
| | | elif type_ == "get_huaxin_subscript_codes": |
| | | # 获取华鑫订阅的代码 |
| | | codes = huaxin_target_codes_manager.get_subscript_codes() |
| | | fresults = [] |
| | | if codes: |
| | | for code in codes: |
| | | code_name = gpcode_manager.get_code_name(code) |
| | | fresults.append((code, code_name)) |
| | | return_str = json.dumps( |
| | | {"code": 0, "data": {"count": len(fresults), "list": fresults}, "msg": ""}) |
| | | # 查询委托列表 |
| | | elif type_ == 'test': |
| | | # 卖出 |