| | |
| | | CancelRateHumanSettingManager().set_l_down(code, rate) |
| | | # L后重新囊括 |
| | | # if rate < old_rate: |
| | | # 改小才能重新囊括 |
| | | # 改小才能重新囊括 |
| | | trade_record_log_util.add_common_msg(code, "L后重新囊括", msg=f"修改撤单比例: {old_rate}->{rate}") |
| | | LCancelBigNumComputer().re_compute_l_down_watch_indexes(code, is_force=True) |
| | | |
| | |
| | | self.send_response({"code": 0, "data": {}}, |
| | | client_id, |
| | | request_id) |
| | | |
| | | elif ctype == "set_code_today_ex_rights": |
| | | # 代码今日除权,需要更新K线 |
| | | code = data.get("code") |
| | | volumes_data = history_k_data_manager.update_history_k_bars_of_code(code, force=True, juejin=True) |
| | | if not volumes_data: |
| | | result = {"code": 1, "msg": "拉取K线失败"} |
| | | else: |
| | | # 更新昨日收盘价数据 |
| | | CodePrePriceManager.set_price_pre(code, volumes_data[0]['close'], force=True) |
| | | gpcode_manager.clear_limit_up_price_cache(code) |
| | | limit_up_price = gpcode_manager.get_limit_up_price_as_num(code) |
| | | # 更新K线特征数据 |
| | | k_format = code_nature_analyse.get_k_format(code, limit_up_price, volumes_data) |
| | | code_nature_analyse.CodeNatureRecordManager().save_k_format(code, k_format) |
| | | result = {"code": 0, "msg": "设置成功"} |
| | | self.send_response(result, |
| | | client_id, |
| | | request_id) |
| | | except Exception as e: |
| | | logging.exception(e) |
| | | logger_debug.exception(e) |