| | |
| | | white = gpcode_manager.WhiteListCodeManager().is_in_cache(code) |
| | | black = l2_trade_util.is_in_forbidden_trade_codes(code) |
| | | pause_buy = gpcode_manager.PauseBuyCodesManager().is_in_cache(code) |
| | | |
| | | must_buy = gpcode_manager.MustBuyCodesManager().is_in_cache(code) |
| | | desc_list = [] |
| | | if want: |
| | | desc_list.append("【想买单】") |
| | |
| | | desc_list.append("【黑名单】") |
| | | if pause_buy: |
| | | desc_list.append("【暂不买】") |
| | | if must_buy: |
| | | desc_list.append("【红名单】") |
| | | |
| | | result = {"code": 0, "data": {"code_info": (code, code_name), "desc": "".join(desc_list)}} |
| | | self.send_response(result, client_id, request_id) |
| | | except Exception as e: |
| | |
| | | match_blocks -= constant.KPL_INVALID_BLOCKS |
| | | fblocks = match_blocks & RealTimeKplMarketData.get_top_market_jingxuan_blocks() |
| | | if not fblocks: |
| | | fblocks, info = CodeThirdBlocksManager().get_intersection_blocks_info(code, blocks, same_count=3) |
| | | fblocks -= constant.KPL_INVALID_BLOCKS |
| | | fblocks = set() |
| | | match_blocks_3, info = CodeThirdBlocksManager().get_intersection_blocks_info(code, blocks, same_count=3) |
| | | if match_blocks_3: |
| | | match_blocks_3 -= constant.KPL_INVALID_BLOCKS |
| | | fblocks |= match_blocks_3 |
| | | |
| | | return fblocks, match_blocks |
| | | |
| | | @classmethod |