Administrator
2026-08-10 b10dfeebdf93728fdba36477467708006f72f993
src/main/java/com/xcong/excoin/modules/gateApi/GateConfigDTO.java
@@ -53,6 +53,18 @@
    private String unrealizedPnlPriceMode;
    /** 是否为生产环境 */
    private boolean isProduction;
    /** 价格驱动开关:true=启用K线推送中的价格驱动逻辑,false=禁用。null=未设置(默认true) */
    private Boolean priceDriveEnabled;
    /** 策略运行轮数上限:达到盈利后重启计数,达到此值后不再重启。0=不限 */
    private int rounds;
    /** 止损次数统计方式:"single"=单向分别统计 / "dual"=双向统一统计,默认 "dual" */
    private String stopLossCountMode;
    /** 加仓间隔:每隔多少次止损触发一次加仓,默认 3 */
    private int addPositionInterval;
    /** 加仓数量:每次加仓追加的张数,默认 1 */
    private int addPositionQuantity;
    /** 单边最大仓位量:单向持仓张数上限,超出则按上限挂单,0=不限制 */
    private int maxPositionPerSide;
    /**
     * 从 GateConfig 构建 DTO(不暴露 apiSecret)。
@@ -78,6 +90,12 @@
                .unrealizedPnlPriceMode(config.getUnrealizedPnlPriceMode() != null
                        ? config.getUnrealizedPnlPriceMode().name() : "LAST_PRICE")
                .isProduction(config.isProduction())
                .priceDriveEnabled(config.isPriceDriveEnabled())
                .rounds(config.getRounds())
                .stopLossCountMode(config.getStopLossCountMode())
                .addPositionInterval(config.getAddPositionInterval())
                .addPositionQuantity(config.getAddPositionQuantity())
                .maxPositionPerSide(config.getMaxPositionPerSide())
                .build();
    }
}