Administrator
2026-09-20 4c3a7487b493ba36f11364b28dc5ca561c9c787c
src/main/java/com/xcong/excoin/modules/gateApi/GateConfigDTO.java
@@ -71,6 +71,12 @@
    private int addPositionStartThreshold;
    /** 止盈挂单模式:off=关闭 / concentrated=集中止盈 / dispersed=分散止盈,默认 off */
    private String placeExcessTakeProfit;
    /** 自定义止损开关:true=启用自定义止损触发价,false=使用默认阶梯止损。null=未设置(默认false) */
    private Boolean dualStopLossEnabled;
    /** 多仓自定义止损触发价(价格跌至该值触发平多),null=未设置 */
    private BigDecimal longStopLossPrice;
    /** 空仓自定义止损触发价(价格涨至该值触发平空),null=未设置 */
    private BigDecimal shortStopLossPrice;
    /**
     * 从 GateConfig 构建 DTO(不暴露 apiSecret)。
@@ -104,6 +110,9 @@
                .maxPositionPerSide(config.getMaxPositionPerSide())
                .addPositionStartThreshold(config.getAddPositionStartThreshold())
                .placeExcessTakeProfit(config.getPlaceExcessTakeProfit())
                .dualStopLossEnabled(config.isDualStopLossEnabled())
                .longStopLossPrice(config.getLongStopLossPrice())
                .shortStopLossPrice(config.getShortStopLossPrice())
                .build();
    }
@@ -131,6 +140,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 +177,9 @@
                .maxPositionPerSide(0)
                .addPositionStartThreshold(1)
                .placeExcessTakeProfit("off")
                .dualStopLossEnabled(false)
                .longStopLossPrice(null)
                .shortStopLossPrice(null)
                .build();
    }
}