Administrator
2026-09-30 22cc53102e209ff34e7f45e28fb994ebe0f7e997
src/main/java/com/xcong/excoin/modules/gateApi/GateConfigDTO.java
@@ -81,6 +81,10 @@
    private Boolean tpTriggerOppositeAddEnabled;
    /** 对向加仓挂单数量:止盈成交后在对向挂出的开仓张数,0=不启用 */
    private Integer tpTriggerOppositeAddQuantity;
    /** 单格止盈张数:基础仓位止盈挂单时每个网格挂的止盈张数,0=不启用 */
    private Integer baseTakeProfitPerGrid;
    /** 止盈网格数量:基础仓位止盈挂单的网格数量,0=不启用 */
    private Integer baseTakeProfitGridCount;
    /**
     * 从 GateConfig 构建 DTO(不暴露 apiSecret)。
@@ -119,6 +123,8 @@
                .shortStopLossPrice(config.getShortStopLossPrice())
                .tpTriggerOppositeAddEnabled(config.isTpTriggerOppositeAddEnabled())
                .tpTriggerOppositeAddQuantity(config.getTpTriggerOppositeAddQuantity())
                .baseTakeProfitPerGrid(config.getBaseTakeProfitPerGrid())
                .baseTakeProfitGridCount(config.getBaseTakeProfitGridCount())
                .build();
    }
@@ -151,6 +157,8 @@
        m.put("shortStopLossPrice", shortStopLossPrice);
        m.put("tpTriggerOppositeAddEnabled", tpTriggerOppositeAddEnabled);
        m.put("tpTriggerOppositeAddQuantity", tpTriggerOppositeAddQuantity);
        m.put("baseTakeProfitPerGrid", baseTakeProfitPerGrid);
        m.put("baseTakeProfitGridCount", baseTakeProfitGridCount);
        return m;
    }
@@ -190,6 +198,8 @@
                .shortStopLossPrice(null)
                .tpTriggerOppositeAddEnabled(false)
                .tpTriggerOppositeAddQuantity(0)
                .baseTakeProfitPerGrid(0)
                .baseTakeProfitGridCount(0)
                .build();
    }
}