| | |
| | | import constant |
| | | import inited_data |
| | | import outside_api_command_manager |
| | | from cancel_strategy.s_l_h_cancel_strategy import SCancelBigNumComputer |
| | | from cancel_strategy.s_l_h_cancel_strategy import SCancelBigNumComputer, LCancelRateManager |
| | | from code_attribute import gpcode_manager, code_volumn_manager, zyltgb_util |
| | | from code_attribute.code_data_util import ZYLTGBUtil |
| | | from code_attribute.code_l1_data_manager import L1DataManager |
| | |
| | | fresult = {"code": 0} |
| | | if code_list_type == outside_api_command_manager.CODE_LIST_WANT: |
| | | if operate == outside_api_command_manager.OPERRATE_SET: |
| | | trade_record_log_util.add_want_buy(code) |
| | | gpcode_manager.WantBuyCodesManager().add_code(code) |
| | | if l2_trade_util.is_in_forbidden_trade_codes(code): |
| | | l2_trade_util.remove_from_forbidden_trade_codes(code) |
| | |
| | | if results: |
| | | gpcode_manager.CodesNameManager.add_first_code_name(code, results[code]) |
| | | elif operate == outside_api_command_manager.OPERRATE_DELETE: |
| | | trade_record_log_util.remove_want_buy(code) |
| | | gpcode_manager.WantBuyCodesManager().remove_code(code) |
| | | elif operate == outside_api_command_manager.OPERRATE_GET: |
| | | codes = gpcode_manager.WantBuyCodesManager().list_code_cache() |
| | |
| | | break |
| | | except: |
| | | pass |
| | | # L撤比例 |
| | | l_down_cancel_rate, must_buy = LCancelRateManager.get_cancel_rate(code, buy_mode = OrderBeginPosInfo.MODE_RADICAL) |
| | | fdata = {"id": orderSysID, "code_info": (code, code_name), "total_num": total_nums, |
| | | "finish_num": deal_or_cancel_num, |
| | | "buy1_money": output_util.money_desc(buy1_money), |
| | |
| | | "limit_up_price": gpcode_manager.get_limit_up_price_as_num(code), |
| | | "is_near_big_order": is_near_big_order, |
| | | "block": '', |
| | | "trade_queue": [] |
| | | "trade_queue": [], |
| | | "l_down_cancel_rate":l_down_cancel_rate |
| | | } |
| | | limit_up_data = kpl_data_manager.KPLLimitUpDataRecordManager.record_code_dict.get(code) |
| | | # 获取当前板块 |