From da4ee9c9039cad44c5b244b810f5fb53467d4633 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期一, 17 三月 2025 09:55:04 +0800 Subject: [PATCH] bug修复 --- api/outside_api_command_callback.py | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/api/outside_api_command_callback.py b/api/outside_api_command_callback.py index 48f7d20..db46a65 100644 --- a/api/outside_api_command_callback.py +++ b/api/outside_api_command_callback.py @@ -46,7 +46,7 @@ from third_data.kpl_limit_up_data_manager import CodeLimitUpSequenceManager from third_data.kpl_util import KPLDataType from third_data.third_blocks_manager import CodeThirdBlocksManager, SOURCE_TYPE_KPL, BlockMapManager -from trade import trade_manager, l2_trade_util, trade_data_manager, trade_constant +from trade import trade_manager, l2_trade_util, trade_data_manager, trade_constant, trade_record_log_util import l2_data_util as l2_data_util_old from trade.buy_money_count_setting import BuyMoneyAndCountSetting, RadicalBuyBlockCodeCountManager from trade.buy_radical import block_special_codes_manager, radical_buy_data_manager @@ -375,6 +375,7 @@ elif code_list_type == outside_api_command_manager.CODE_LIST_MUST_BUY: if operate == outside_api_command_manager.OPERRATE_SET: gpcode_manager.MustBuyCodesManager().add_code(code) + trade_record_log_util.add_must_buy(code, "鎵嬪姩鎷夌孩") name = gpcode_manager.get_code_name(code) if not name: results = HistoryKDatasUtils.get_gp_codes_names([code]) @@ -549,10 +550,8 @@ latest_trading_date = history_k_data_util.get_k_bar_dead_date() codes = HistoryKDataManager().get_history_bars_codes(latest_trading_date) count = len(codes) - logger_debug.info(f"K绾夸唬鐮佹暟閲忥細{count}") fdata["today_history_k_bar_count"] = count except Exception as e: - logger_debug.exception(e) fdata["today_history_k_bar_count"] = -1 # 鑾峰彇鏁版嵁鏈嶅姟鍣ㄦ槸鍚﹁仈閫� @@ -1349,7 +1348,8 @@ "radical_buy": {"price": (constant.MIN_CODE_RADICAL_BUY_PRICE, constant.MAX_CODE_RADICAL_BUY_PRICE), "zyltgb": constant.RADICAL_BUY_ZYLTGB_AS_YI_RANGES, "top_block_count_by_market_strong": constant.RADICAL_BUY_TOP_IN_COUNT_BY_MARKET_STRONG, - "special_codes_max_block_in_rank": constant.RADICAL_BUY_TOP_IN_INDEX_WITH_SPECIAL + "special_codes_max_block_in_rank": constant.RADICAL_BUY_TOP_IN_INDEX_WITH_SPECIAL, + "ignore_block_in_money_market_strong":constant.IGNORE_BLOCK_IN_MONEY_MARKET_STRONG }} self.send_response({"code": 0, "data": data, "msg": f""}, client_id, @@ -1367,7 +1367,8 @@ if radical_buy.get("special_codes_max_block_in_rank"): constant.RADICAL_BUY_TOP_IN_INDEX_WITH_SPECIAL = radical_buy.get( "special_codes_max_block_in_rank") - + if radical_buy.get('ignore_block_in_money_market_strong') is not None: + constant.IGNORE_BLOCK_IN_MONEY_MARKET_STRONG = radical_buy.get('ignore_block_in_money_market_strong') self.send_response({"code": 0, "data": {}, "msg": f""}, client_id, request_id) -- Gitblit v1.8.0