Administrator
2026-08-04 997402a560b6c78175346a5659e33acaba96d889
src/main/java/com/xcong/excoin/modules/gateApi/GateConfigDTO.java
@@ -41,6 +41,8 @@
    private int maxPositionSize;
    /** 止损阶梯次数,0=禁用 */
    private int stopLossCount;
    /** 止盈网格跨度:相邻止盈单跨越的网格数量,默认 2 */
    private int takeProfitGridSpan;
    /** 策略重启跨度阈值,0=禁用 */
    private int restartGridSpan;
    /** 价格精度 */
@@ -51,6 +53,10 @@
    private String unrealizedPnlPriceMode;
    /** 是否为生产环境 */
    private boolean isProduction;
    /** 价格驱动开关:true=启用K线推送中的价格驱动逻辑,false=禁用。null=未设置(默认true) */
    private Boolean priceDriveEnabled;
    /** 策略运行轮数上限:达到盈利后重启计数,达到此值后不再重启。0=不限 */
    private int rounds;
    /**
     * 从 GateConfig 构建 DTO(不暴露 apiSecret)。
@@ -69,12 +75,15 @@
                .quantity(config.getQuantity())
                .maxPositionSize(config.getMaxPositionSize())
                .stopLossCount(config.getStopLossCount())
                .takeProfitGridSpan(config.getTakeProfitGridSpan())
                .restartGridSpan(config.getRestartGridSpan())
                .priceScale(config.getPriceScale())
                .contractMultiplier(config.getContractMultiplier())
                .unrealizedPnlPriceMode(config.getUnrealizedPnlPriceMode() != null
                        ? config.getUnrealizedPnlPriceMode().name() : "LAST_PRICE")
                .isProduction(config.isProduction())
                .priceDriveEnabled(config.isPriceDriveEnabled())
                .rounds(config.getRounds())
                .build();
    }
}