From b775aff32900ad4e9fda2bcb1c15d1d52416d862 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期五, 11 四月 2025 00:57:35 +0800 Subject: [PATCH] bug修复 --- api/outside_api_command_callback.py | 30 ++++++++++++++++++++++++++---- 1 files changed, 26 insertions(+), 4 deletions(-) diff --git a/api/outside_api_command_callback.py b/api/outside_api_command_callback.py index 33e1218..d14a2b9 100644 --- a/api/outside_api_command_callback.py +++ b/api/outside_api_command_callback.py @@ -1063,7 +1063,22 @@ except: pass # L鎾ゆ瘮渚� - l_down_cancel_rate, must_buy = LCancelRateManager.get_cancel_rate(code, buy_mode = OrderBeginPosInfo.MODE_RADICAL) + l_down_cancel_rate, must_buy = LCancelRateManager.get_cancel_rate(code, + buy_mode=OrderBeginPosInfo.MODE_RADICAL) + + # 鍦ㄦ寕鐨勮窛绂绘垚浜よ繘搴︿綅閲戦/锛堣繙杩戞湡鍙傝�冮噺-鍗曞綋鏃ュ疄鏃舵垚浜ら噺锛�*100% + expire_rate = "鏈煡" + try: + referer_volume = code_volumn_manager.CodeVolumeManager().get_radical_buy_refer_volume( + code, limit_up_price) + today_volumn = code_volumn_manager.CodeVolumeManager().get_today_volumn_cache(code) + if referer_volume == today_volumn: + expire_rate = "100%" + else: + expire_rate = f"{100 - round(100 * total_left_num * 100 / (referer_volume - today_volumn), 2)}%" + except: + pass + fdata = {"id": orderSysID, "code_info": (code, code_name), "total_num": total_nums, "finish_num": deal_or_cancel_num, "buy1_money": output_util.money_desc(buy1_money), @@ -1087,7 +1102,8 @@ "is_near_big_order": is_near_big_order, "block": '', "trade_queue": [], - "l_down_cancel_rate":l_down_cancel_rate + "l_down_cancel_rate": l_down_cancel_rate, + "expire_rate": expire_rate } limit_up_data = kpl_data_manager.KPLLimitUpDataRecordManager.record_code_dict.get(code) # 鑾峰彇褰撳墠鏉垮潡 @@ -1354,7 +1370,8 @@ "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, - "ignore_block_in_money_market_strong":constant.IGNORE_BLOCK_IN_MONEY_MARKET_STRONG + "ignore_block_in_money_market_strong": constant.IGNORE_BLOCK_IN_MONEY_MARKET_STRONG, + "buy_first_limit_up": 1 if constant.CAN_BUY_FIRST_LIMIT_UP else 0 }} self.send_response({"code": 0, "data": data, "msg": f""}, client_id, @@ -1373,7 +1390,12 @@ 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') + constant.IGNORE_BLOCK_IN_MONEY_MARKET_STRONG = radical_buy.get( + 'ignore_block_in_money_market_strong') + if radical_buy.get('buy_first_limit_up') is not None: + constant.CAN_BUY_FIRST_LIMIT_UP = True if radical_buy.get( + 'buy_first_limit_up') else False + self.send_response({"code": 0, "data": {}, "msg": f""}, client_id, request_id) -- Gitblit v1.8.0