| | |
| | | fresult = {"code": 0, "data": datas} |
| | | elif code_list_type == outside_api_command_manager.CODE_LIST_WHITE: |
| | | if operate == outside_api_command_manager.OPERRATE_SET: |
| | | gpcode_manager.WhiteListCodeManager().add_code(code) |
| | | gpcode_manager.WhiteListCodeManager().add_code(code, is_human=True) |
| | | name = gpcode_manager.get_code_name(code) |
| | | if not name: |
| | | results = HistoryKDatasUtils.get_gp_codes_names([code]) |
| | | if results: |
| | | gpcode_manager.CodesNameManager.add_first_code_name(code, results[code]) |
| | | elif operate == outside_api_command_manager.OPERRATE_DELETE: |
| | | gpcode_manager.WhiteListCodeManager().remove_code(code) |
| | | gpcode_manager.WhiteListCodeManager().remove_code(code, is_human=True) |
| | | elif operate == outside_api_command_manager.OPERRATE_GET: |
| | | codes = gpcode_manager.WhiteListCodeManager().list_codes_cache() |
| | | datas = [] |
| | |
| | | "top_block_count_by_market_strong": constant.RADICAL_BUY_TOP_IN_COUNT_BY_MARKET_STRONG, |
| | | "special_codes_max_block_in_rank": constant.RADICAL_BUY_TOP_IN_INDEX_WITH_SPECIAL, |
| | | "ignore_block_in_money_market_strong": constant.IGNORE_BLOCK_IN_MONEY_MARKET_STRONG, |
| | | "buy_first_limit_up": 1 if constant.CAN_BUY_FIRST_LIMIT_UP else 0 |
| | | "buy_first_limit_up": 1 if constant.CAN_BUY_FIRST_LIMIT_UP else 0, |
| | | "can_auto_add_white": 1 if constant.CAN_AUTO_ADD_WHITE else 0 |
| | | }} |
| | | self.send_response({"code": 0, "data": data, "msg": f""}, |
| | | client_id, |
| | |
| | | if radical_buy.get('buy_first_limit_up') is not None: |
| | | constant.CAN_BUY_FIRST_LIMIT_UP = True if radical_buy.get( |
| | | 'buy_first_limit_up') else False |
| | | if radical_buy.get('can_auto_add_white') is not None: |
| | | constant.CAN_AUTO_ADD_WHITE = True if radical_buy.get( |
| | | 'can_auto_add_white') else False |
| | | |
| | | self.send_response({"code": 0, "data": {}, "msg": f""}, |
| | | client_id, |