From f0b8d2b628d5d71bcb0e1f87e30e8c9d344ecd69 Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Wed, 23 Sep 2026 18:01:54 +0800
Subject: [PATCH] fix(gateApi): 修复止损订单数量计算逻辑
---
src/main/java/com/xcong/excoin/modules/gateApi/GateConfigDTO.java | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 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 8a7b16c..aa04156 100644
--- a/src/main/java/com/xcong/excoin/modules/gateApi/GateConfigDTO.java
+++ b/src/main/java/com/xcong/excoin/modules/gateApi/GateConfigDTO.java
@@ -72,11 +72,11 @@
/** 止盈挂单模式:off=关闭 / concentrated=集中止盈 / dispersed=分散止盈,默认 off */
private String placeExcessTakeProfit;
/** 自定义止损开关:true=启用自定义止损触发价,false=使用默认阶梯止损。null=未设置(默认false) */
- private Boolean customStopLossEnabled;
+ private Boolean dualStopLossEnabled;
/** 多仓自定义止损触发价(价格跌至该值触发平多),null=未设置 */
- private BigDecimal longCustomStopLossPrice;
+ private BigDecimal longStopLossPrice;
/** 空仓自定义止损触发价(价格涨至该值触发平空),null=未设置 */
- private BigDecimal shortCustomStopLossPrice;
+ private BigDecimal shortStopLossPrice;
/**
* 从 GateConfig 构建 DTO(不暴露 apiSecret)。
@@ -110,9 +110,9 @@
.maxPositionPerSide(config.getMaxPositionPerSide())
.addPositionStartThreshold(config.getAddPositionStartThreshold())
.placeExcessTakeProfit(config.getPlaceExcessTakeProfit())
- .customStopLossEnabled(config.isCustomStopLossEnabled())
- .longCustomStopLossPrice(config.getLongCustomStopLossPrice())
- .shortCustomStopLossPrice(config.getShortCustomStopLossPrice())
+ .dualStopLossEnabled(config.isDualStopLossEnabled())
+ .longStopLossPrice(config.getLongStopLossPrice())
+ .shortStopLossPrice(config.getShortStopLossPrice())
.build();
}
@@ -140,9 +140,9 @@
m.put("maxPositionPerSide", maxPositionPerSide);
m.put("addPositionStartThreshold", addPositionStartThreshold);
m.put("placeExcessTakeProfit", placeExcessTakeProfit);
- m.put("customStopLossEnabled", customStopLossEnabled);
- m.put("longCustomStopLossPrice", longCustomStopLossPrice);
- m.put("shortCustomStopLossPrice", shortCustomStopLossPrice);
+ m.put("dualStopLossEnabled", dualStopLossEnabled);
+ m.put("longStopLossPrice", longStopLossPrice);
+ m.put("shortStopLossPrice", shortStopLossPrice);
return m;
}
@@ -177,9 +177,9 @@
.maxPositionPerSide(0)
.addPositionStartThreshold(1)
.placeExcessTakeProfit("off")
- .customStopLossEnabled(false)
- .longCustomStopLossPrice(null)
- .shortCustomStopLossPrice(null)
+ .dualStopLossEnabled(false)
+ .longStopLossPrice(null)
+ .shortStopLossPrice(null)
.build();
}
}
--
Gitblit v1.9.1