From ff1a51a49e02aa347463257eccfab61c8c0cf0bd Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Sun, 20 Sep 2026 15:49:14 +0800
Subject: [PATCH] feat(station): 添加双开止损触发配置功能
---
src/main/java/com/xcong/excoin/modules/gateApi/GateConfigDTO.java | 12 ++++++++++++
1 files changed, 12 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 97be386..c083e4d 100644
--- a/src/main/java/com/xcong/excoin/modules/gateApi/GateConfigDTO.java
+++ b/src/main/java/com/xcong/excoin/modules/gateApi/GateConfigDTO.java
@@ -71,6 +71,12 @@
private int addPositionStartThreshold;
/** 超额止盈开关:true=挂单成交后将超出基础仓位的部分挂止盈单,默认 false */
private boolean placeExcessTakeProfit;
+ /** 双开止损触发开关:true=按多空止损触发价初始化双向止损单,false=沿用现有逻辑 */
+ private Boolean dualStopLossEnabled;
+ /** 多头止损触发价 */
+ private String longStopLossPrice;
+ /** 空头止损触发价 */
+ private String shortStopLossPrice;
/**
* 从 GateConfig 构建 DTO(不暴露 apiSecret)。
@@ -131,6 +137,9 @@
m.put("maxPositionPerSide", maxPositionPerSide);
m.put("addPositionStartThreshold", addPositionStartThreshold);
m.put("placeExcessTakeProfit", placeExcessTakeProfit);
+ m.put("dualStopLossEnabled", dualStopLossEnabled);
+ m.put("longStopLossPrice", longStopLossPrice);
+ m.put("shortStopLossPrice", shortStopLossPrice);
return m;
}
@@ -165,6 +174,9 @@
.maxPositionPerSide(0)
.addPositionStartThreshold(1)
.placeExcessTakeProfit(false)
+ .dualStopLossEnabled(false)
+ .longStopLossPrice(null)
+ .shortStopLossPrice(null)
.build();
}
}
--
Gitblit v1.9.1