From d2a4dd9c837f8df2a19e58f7fb4c81a91c114b67 Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期五, 15 八月 2025 13:15:32 +0800
Subject: [PATCH] 自动加想接口

---
 api/outside_api_command_callback.py |   20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/api/outside_api_command_callback.py b/api/outside_api_command_callback.py
index 42eea24..f6e6402 100644
--- a/api/outside_api_command_callback.py
+++ b/api/outside_api_command_callback.py
@@ -806,7 +806,7 @@
             current_price = L1DataManager.get_l1_current_price(code)
             if current_price:
                 fdata["cost_price"] = current_price
-                pre_close_price = CodePrePriceManager.get_price_pre_cache(code)
+                pre_close_price = CodePrePriceManager().get_price_pre_cache(code)
                 if current_price and pre_close_price:
                     rate = round((float(current_price) - float(pre_close_price)) / float(pre_close_price), 4)
                     fdata["cost_price_rate"] = rate
@@ -1126,6 +1126,11 @@
                             l_down_cancel_rate, must_buy, cancel_rate_info = LCancelRateManager.get_cancel_rate(code,
                                                                                                                 buy_mode=OrderBeginPosInfo.MODE_RADICAL)
 
+                            # 璁$畻澶у崟鎴愪氦
+                            # (缂哄皯鐨勮祫閲�, 鍑�鎴愪氦閲戦, 瑕佹眰鐨勫ぇ鍗曢噾棰�, 璁$畻寰楀埌鐨勫ぇ鍗曢槇鍊奸噾棰�, 浜轰负璁剧疆鐨勫ぇ鍗�)
+                            deal_big_money_info = radical_buy_data_manager.get_total_deal_big_order_info(
+                                code, gpcode_manager.get_limit_up_price_as_num(code))
+
                             fdata = {"id": orderSysID, "code_info": (code, code_name),
                                      "buy1_money": output_util.money_desc(buy1_money),
                                      "left_count": total_left_count,
@@ -1137,8 +1142,11 @@
                                      "block": '',
                                      "trade_queue": [],
                                      "l_down_cancel_rate": l_down_cancel_rate,
-                                     "l_down_cancel_rate_info": cancel_rate_info,
+                                     "l_down_cancel_rate_info": cancel_rate_info
                                      }
+                            if deal_big_money_info:
+                                fdata["deal_big_money_info"] = deal_big_money_info
+
                             limit_up_data = kpl_data_manager.KPLLimitUpDataRecordManager.record_code_dict.get(code)
                             # 鑾峰彇褰撳墠鏉垮潡
                             try:
@@ -1430,7 +1438,8 @@
                                     "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,
                                     "buy_first_limit_up": 1 if constant.CAN_BUY_FIRST_LIMIT_UP else 0,
-                                    "can_auto_add_white": 1 if constant.CAN_AUTO_ADD_WHITE else 0
+                                    "can_auto_add_white": 1 if constant.CAN_AUTO_ADD_WHITE else 0,
+                                    "can_auto_add_want_buy_codes": 1 if constant.CAN_AUTO_ADD_WANT_BUY_CODES else 0
                                     }}
                 self.send_response({"code": 0, "data": data, "msg": f""},
                                    client_id,
@@ -1457,6 +1466,9 @@
                     if radical_buy.get('can_auto_add_white') is not None:
                         constant.CAN_AUTO_ADD_WHITE = True if radical_buy.get(
                             'can_auto_add_white') else False
+                    if radical_buy.get('can_auto_add_want_buy_codes') is not None:
+                        constant.CAN_AUTO_ADD_WANT_BUY_CODES = True if radical_buy.get(
+                            'can_auto_add_want_buy_codes') else False
 
                 self.send_response({"code": 0, "data": {}, "msg": f""},
                                    client_id,
@@ -1607,7 +1619,7 @@
                     result = {"code": 1, "msg": "鎷夊彇K绾垮け璐�"}
                 else:
                     # 鏇存柊鏄ㄦ棩鏀剁洏浠锋暟鎹�
-                    CodePrePriceManager.set_price_pre(code, volumes_data[0]['close'], force=True)
+                    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绾跨壒寰佹暟鎹�

--
Gitblit v1.8.0