From e6cbb6c96b6576da5eaf089cfa3dd6098cc6baf9 Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期二, 27 五月 2025 15:40:30 +0800
Subject: [PATCH] 人为修改大单阈值

---
 api/outside_api_command_callback.py |   27 ++++++++++++++++++++++-----
 1 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/api/outside_api_command_callback.py b/api/outside_api_command_callback.py
index db672cd..5eaa25a 100644
--- a/api/outside_api_command_callback.py
+++ b/api/outside_api_command_callback.py
@@ -54,7 +54,8 @@
 from trade.huaxin import huaxin_trade_api, huaxin_trade_data_update, \
     huaxin_trade_record_manager, huaxin_trade_order_processor, huaxin_sell_util
 from trade.huaxin.huaxin_trade_record_manager import PositionManager, DealRecordManager, DelegateRecordManager
-from trade.buy_radical.radical_buy_data_manager import RadicalBuyBlockManager, BeforeSubDealBigOrderManager
+from trade.buy_radical.radical_buy_data_manager import RadicalBuyBlockManager, BeforeSubDealBigOrderManager, \
+    TotalDealBigOrderThresholdMoneyManager
 from trade.sell import sell_manager
 from trade.sell.sell_rule_manager import TradeRuleManager, SellRule
 from trade.trade_data_manager import RadicalBuyDealCodesManager
@@ -1319,7 +1320,9 @@
                     if volumes_data:
                         is_new_top = code_nature_analyse.is_new_top(code,
                                                                     gpcode_manager.get_limit_up_price_by_preprice(code,
-                                                                                                                  volumes_data[0]["close"]),
+                                                                                                                  volumes_data[
+                                                                                                                      0][
+                                                                                                                      "close"]),
                                                                     volumes_data)
 
                 data = {
@@ -1390,7 +1393,8 @@
                                     "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,
-                                    "buy_first_limit_up": 1 if constant.CAN_BUY_FIRST_LIMIT_UP else 0
+                                    "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
                                     }}
                 self.send_response({"code": 0, "data": data, "msg": f""},
                                    client_id,
@@ -1414,6 +1418,9 @@
                     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
+                    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
 
                 self.send_response({"code": 0, "data": {}, "msg": f""},
                                    client_id,
@@ -1472,8 +1479,18 @@
                                    client_id,
                                    request_id)
 
-
-
+            elif ctype == "set_total_deal_big_order_threshold_money":
+                code = data.get("code")
+                money = data.get("money")
+                if not code or not money:
+                    self.send_response({"code": 1, "data": {}, "msg": "code/money涓虹┖"},
+                                       client_id,
+                                       request_id)
+                    return
+                TotalDealBigOrderThresholdMoneyManager().set_money(code, int(money))
+                self.send_response({"code": 0, "data": {}},
+                                   client_id,
+                                   request_id)
         except Exception as e:
             logging.exception(e)
             logger_debug.exception(e)

--
Gitblit v1.8.0