From d1df4e77d2188ff3ad84b66fb2ba7f9bc738031d Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期二, 12 八月 2025 14:48:13 +0800 Subject: [PATCH] 记录L1的最大价格信息 --- api/outside_api_command_callback.py | 23 ++++++++++++++++++++--- 1 files changed, 20 insertions(+), 3 deletions(-) diff --git a/api/outside_api_command_callback.py b/api/outside_api_command_callback.py index 7060f65..42eea24 100644 --- a/api/outside_api_command_callback.py +++ b/api/outside_api_command_callback.py @@ -1032,7 +1032,7 @@ except Exception as e: logger_debug.exception(e) - result = {"code": 0, "data": {"account_available_money": account_available_money, "delegates": fdatas}} + result = {"code": 0, "data": {"account_available_money": account_available_money, "delegates": fdatas, "rate_of_increase_step": constant.L_DOWN_RATE_INCREASE_STEP}} self.send_response(result, client_id, request_id) elif ctype == "get_delegated_buy_code_infos_v2": account_available_money = trade_data_manager.AccountMoneyManager().get_available_money_cache() @@ -1560,7 +1560,7 @@ 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) @@ -1599,7 +1599,24 @@ self.send_response({"code": 0, "data": {}}, client_id, request_id) - + elif ctype == "set_code_today_ex_rights": + # 浠g爜浠婃棩闄ゆ潈锛岄渶瑕佹洿鏂癒绾� + 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) -- Gitblit v1.8.0