Administrator
2023-08-03 783f6b0c18272b7f9ee988664c4194ecc80e23a7
third_data/code_plate_key_manager.py
@@ -408,7 +408,7 @@
        # 涨停列表中匹配关键词,返回(板块:代码集合),代码集合中已经排除自身
        if not keys:
            return cls.BLOCK_TYPE_NONE, None, "尚未找到涨停原因"
            return None, "尚未找到涨停原因"
        code_limit_up_reason_dict = {}
        load_code_block()
        msg_list = []
@@ -469,7 +469,7 @@
                            f"板块-{block}: 不是top4涨停板块,满足精选/行业流入要求,不为主板龙1(实时身位-{current_shsz_rank},历史身位-{record_shsz_rank})")
                        continue
        if len(can_buy_blocks) == len(keys):
            blocks = "/".join([x[0] for x in can_buy_blocks])
            blocks = [x[0] for x in can_buy_blocks]
            blocks_msg = "\n".join([x[1] for x in can_buy_blocks])
            return blocks, blocks_msg
@@ -483,10 +483,10 @@
        if constant.TEST:
            return True, "", cls.BLOCK_TYPE_NONE
        block, block_msg = cls.get_can_buy_block(code, current_limit_up_datas,
        blocks, block_msg = cls.get_can_buy_block(code, current_limit_up_datas,
                                                 limit_up_record_datas, yesterday_current_limit_up_codes,
                                                 before_blocks_dict)
        if block is None:
        if not blocks:
            return False, block_msg
        # ---------------------------------判断目标代码的板块-------------------start------------
@@ -567,11 +567,11 @@
        # ---------------------------------加载已经下单/成交的代码信息------------end-------------
        msg_list = []
        for key in [block]:
        for key in blocks:
            # 板块中已经有成交的就不下单了
            if key in trade_success_blocks_count:
                success_codes_count = len(trade_success_blocks_count[key])
                if success_codes_count >= 2:
                if success_codes_count >= 1:
                    msg_list.append(f"【{key}】中已经有{success_codes_count}个成交代码")
                    log.logger_kpl_debug.debug(f"{code}:板块({key})已经有成交【{trade_success_blocks_count[key]}】")
                    continue