| | |
| | | diff_codes = set(want_codes) - set(codes) |
| | | if diff_codes: |
| | | # 想买单的代码还没有在目标代码中 |
| | | zyltgb_list = [] |
| | | for code in diff_codes: |
| | | # 获取涨停价 |
| | | _limit_up_price = gpcode_manager.get_limit_up_price(code) |
| | |
| | | dataList.append({"code": code, "price": f"{_limit_up_price}", "volume": "0", |
| | | "volumeUnit": 0, "time": "00:00:00", "zyltgb": "100", |
| | | "zyltgbUnit": 0}) |
| | | # 强制更新自由流通股本 |
| | | if zyltgb_list: |
| | | ZYLTGBUtil.save_list(zyltgb_list) |
| | | # 将保存的数据更新到内存中 |
| | | for z in zyltgb_list: |
| | | val = ZYLTGBUtil.get(z["code"]) |
| | | if val: |
| | | global_util.zyltgb_map[z["code"]] = val |
| | | |
| | | # ---保存未筛选的首板代码 |
| | | new_add_codes = gpcode_first_screen_manager.set_target_no_screen_codes(codes) |
| | |
| | | # except Exception as e: |
| | | # logging.exception(e) |
| | | # pass |
| | | |
| | | logger_l2_codes_subscript.info(f"{request_id}加载l2代码涨停价结束") |
| | | # 获取60天最大记录 |
| | | for code in codes: |
| | | need_get_volumn = False |
| | |
| | | l2_trade_util.forbidden_trade(code, |
| | | f"无辨识度,涨停价({limit_up_price})>50") |
| | | continue |
| | | if code_nature_analyse.is_price_too_high_in_days(code, volumes_data, limit_up_price)[0]: |
| | | if code_nature_analyse.is_price_too_high_in_days(code, volumes_data, limit_up_price)[0] and code.find("30")!=0: |
| | | # 判断是否太高 |
| | | l2_trade_util.forbidden_trade(code, "6天内股价长得太高") |
| | | continue |
| | |
| | | except Exception as e: |
| | | logger_first_code_record.error(f"{code}:{str(e)}") |
| | | logger_first_code_record.exception(e) |
| | | |
| | | logger_l2_codes_subscript.info(f"{request_id}加载l2代码K线结束") |
| | | |
| | | gpcode_manager.FirstCodeManager().add_record(codes) |
| | | # 初始化板块信息,暂时删除 |
| | | # for code in codes: |