From 8cadc2c947d541bd2621892b5764d2d3e7697cad Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Fri, 30 Oct 2026 17:49:33 +0800
Subject: [PATCH] feat(gate): 实现仓位止盈补仓功能

---
 src/main/java/com/xcong/excoin/modules/gateApi/GateConfigDTO.java |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/xcong/excoin/modules/gateApi/GateConfigDTO.java b/src/main/java/com/xcong/excoin/modules/gateApi/GateConfigDTO.java
index 962f697..09eb4ef 100644
--- a/src/main/java/com/xcong/excoin/modules/gateApi/GateConfigDTO.java
+++ b/src/main/java/com/xcong/excoin/modules/gateApi/GateConfigDTO.java
@@ -83,6 +83,8 @@
     private Boolean tpTriggerOppositeAddEnabled;
     /** 对向加仓挂单数量:止盈成交后在对向挂出的开仓张数,0=不启用 */
     private Integer tpTriggerOppositeAddQuantity;
+    /** 仓位止盈补仓开关:true=止盈触发时在对侧止损位挂同方向同张数开仓单,false=保持现有逻辑。null=未设置(默认false) */
+    private Boolean tpPositionReplenishEnabled;
     /** 单格止盈张数:基础仓位止盈挂单时每个网格挂的止盈张数,支持小数,0=不启用 */
     private BigDecimal baseTakeProfitPerGrid;
     /** 止盈网格数量:基础仓位止盈挂单的网格数量,0=不启用 */
@@ -126,6 +128,7 @@
                 .shortStopLossPrice(config.getShortStopLossPrice())
                 .tpTriggerOppositeAddEnabled(config.isTpTriggerOppositeAddEnabled())
                 .tpTriggerOppositeAddQuantity(config.getTpTriggerOppositeAddQuantity())
+                .tpPositionReplenishEnabled(config.isTpPositionReplenishEnabled())
                 .baseTakeProfitPerGrid(config.getBaseTakeProfitPerGrid())
                 .baseTakeProfitGridCount(config.getBaseTakeProfitGridCount())
                 .build();
@@ -161,6 +164,7 @@
         m.put("shortStopLossPrice", shortStopLossPrice);
         m.put("tpTriggerOppositeAddEnabled", tpTriggerOppositeAddEnabled);
         m.put("tpTriggerOppositeAddQuantity", tpTriggerOppositeAddQuantity);
+        m.put("tpPositionReplenishEnabled", tpPositionReplenishEnabled);
         m.put("baseTakeProfitPerGrid", baseTakeProfitPerGrid);
         m.put("baseTakeProfitGridCount", baseTakeProfitGridCount);
         return m;
@@ -203,6 +207,7 @@
                 .shortStopLossPrice(null)
                 .tpTriggerOppositeAddEnabled(false)
                 .tpTriggerOppositeAddQuantity(0)
+                .tpPositionReplenishEnabled(false)
                 .baseTakeProfitPerGrid(BigDecimal.ZERO)
                 .baseTakeProfitGridCount(0)
                 .build();

--
Gitblit v1.9.1