| | |
| | | msg_list.append(f"\n实时top10: {top_4_current}(涨停数量:{len(current_limit_up_datas)})") |
| | | msg_list.append(f"历史top20: {top_8_record}") |
| | | |
| | | # 获取主板实时身位 |
| | | # 获取主板实时身位,剔除高位板 |
| | | current_shsz_rank = kpl_block_util.get_code_current_rank(code, block, current_limit_up_datas, |
| | | code_limit_up_reason_dict, shsz=True) |
| | | code_limit_up_reason_dict, yesterday_current_limit_up_codes, shsz=True) |
| | | record_shsz_rank = kpl_block_util.get_code_record_rank(code, block, limit_up_record_datas, |
| | | code_limit_up_reason_dict, shsz=True) |
| | | code_limit_up_reason_dict, yesterday_current_limit_up_codes, shsz=True) |
| | | # 获取主板历史身位 |
| | | if is_top_4: |
| | | pen_limit_up_codes = kpl_block_util.get_shsz_open_limit_up_codes(code, block, limit_up_record_datas, |
| | |
| | | |
| | | # 获取当日历史身位 |
| | | # shsz:是否主板 |
| | | def get_code_record_rank(code, block, limit_up_record_datas, code_limit_up_reason_dict, shsz=True): |
| | | def get_code_record_rank(code, block, limit_up_record_datas, code_limit_up_reason_dict, yesterday_current_limit_up_codes, shsz=True): |
| | | block_codes_infos = [] |
| | | limit_up_time = time.time() |
| | | for k in limit_up_record_datas: |
| | | if shsz and k[3].find("00") != 0 and k[3].find("60") != 0: |
| | | continue |
| | | # 剔除高位板 |
| | | if k[3] in yesterday_current_limit_up_codes: |
| | | continue |
| | | if code_limit_up_reason_dict.get(k[3]) == block: |
| | | if k[3] != code: |
| | |
| | | |
| | | # 获取当日实时身位 |
| | | # before_blocks_dict格式位{"代码":set("板块")} |
| | | def get_code_current_rank(code, block, current_limit_up_datas, code_limit_up_reason_dict, shsz=False): |
| | | def get_code_current_rank(code, block, current_limit_up_datas, code_limit_up_reason_dict, yesterday_current_limit_up_codes, shsz=False): |
| | | block_codes_infos = [] |
| | | limit_up_time = time.time() |
| | | for k in current_limit_up_datas: |
| | | if shsz and k[0].find("00") != 0 and k[0].find("60") != 0: |
| | | continue |
| | | # 剔除高位板 |
| | | if k[0] in yesterday_current_limit_up_codes: |
| | | continue |
| | | if code_limit_up_reason_dict.get(k[0]) == block: |
| | | if k[0] != code: |
| | | # 代码.涨停时间 |