605ad02775830168f4cf989b705c02d78709155d..4802f4b913efa31a97942fde6d07366f2de534ec
2026-06-18 Administrator
fix(gateApi): 修正网格交易费率配置
4802f4 diff | tree
2026-06-18 Administrator
fix(gateApi): 修复网格交易止损单数量计算逻辑
e167d6 diff | tree
2 files modified
12 ■■■■■ changed files
src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java 10 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/gateApi/GateWebSocketClientManager.java 2 ●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java
@@ -1246,8 +1246,9 @@
            furthestSlId = gridId;
            interval = 2;
        }
        log.info("[Gate] 多仓追挂止损, 当前最远止损gridId:{}, 追加{}张", furthestSlId, filledQty);
        for (int i = 0; i < filledQty; i++) {
        int stopLossCount = filledQty / Integer.parseInt(config.getQuantity());
        log.info("[Gate] 多仓追挂止损, 当前最远止损gridId:{}, 成交{}张, 追加{}个止损单", furthestSlId, filledQty, stopLossCount);
        for (int i = 0; i < stopLossCount; i++) {
            int newSlId = furthestSlId - i - interval;
            GridElement elem = GridElement.findById(newSlId);
            if (elem == null) {
@@ -1282,8 +1283,9 @@
            furthestSlId = gridId;
            interval = 2;
        }
        log.info("[Gate] 空仓追挂止损, 当前最远止损gridId:{}, 追加{}张", furthestSlId, filledQty);
        for (int i = 0; i < filledQty; i++) {
        int stopLossCount = filledQty / Integer.parseInt(config.getQuantity());
        log.info("[Gate] 空仓追挂止损, 当前最远止损gridId:{}, 成交{}张, 追加{}个止损单", furthestSlId, filledQty, stopLossCount);
        for (int i = 0; i < stopLossCount; i++) {
            int newSlId = furthestSlId + i + interval;
            GridElement elem = GridElement.findById(newSlId);
            if (elem == null) {
src/main/java/com/xcong/excoin/modules/gateApi/GateWebSocketClientManager.java
@@ -64,7 +64,7 @@
                    .leverage("100")
                    .marginMode("CROSS")
                    .positionMode("dual")
                    .gridRate(new BigDecimal("0.0025"))
                    .gridRate(new BigDecimal("0.002"))
                    .expectedProfit(new BigDecimal("2.5"))
                    .maxLoss(new BigDecimal("1.5"))
                    .baseQuantity("1")