Administrator
2026-06-06 f26b4645c4cd07a570967adc017b10a5cf4b82c7
src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java
@@ -1559,20 +1559,22 @@
                }
                BigDecimal tpPrice = nextGrid.getGridPrice();
                final long finalPosSize = actualPosSize;
                final int finalNextGridId = nextGridId;
                if (isLong) {
                    executor.placeTakeProfit(tpPrice,
                            FuturesPriceTrigger.RuleEnum.NUMBER_1,
                            ORDER_TYPE_CLOSE_LONG,
                            negate(config.getQuantity()),
                            profitId -> log.info("[Gate] 多仓超限止盈已挂(持仓:{})>, gridId:{}, tpPrice:{}, id:{}",
                                    actualPosSize, nextGridId, tpPrice, profitId));
                                    finalPosSize, finalNextGridId, tpPrice, profitId));
                } else {
                    executor.placeTakeProfit(tpPrice,
                            FuturesPriceTrigger.RuleEnum.NUMBER_2,
                            ORDER_TYPE_CLOSE_SHORT,
                            config.getQuantity(),
                            profitId -> log.info("[Gate] 空仓超限止盈已挂(持仓:{})>, gridId:{}, tpPrice:{}, id:{}",
                                    actualPosSize, nextGridId, tpPrice, profitId));
                                    finalPosSize, finalNextGridId, tpPrice, profitId));
                }
            } catch (Exception e) {
                log.warn("[Gate] 通过API查询持仓超限检查失败", e);