Administrator
6 days ago cf91e7def616b573923770e89bc88a6ac9abc946
src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java
@@ -567,7 +567,7 @@
        }
        // 异步检查盈亏,避免 REST 调用阻塞 WS 心跳导致 Socket closed
        executor.submitTask(this::checkProfitAndReset);
        executor.submitMaintenanceTask(this::checkProfitAndReset);
        // 持仓主动对账(节流):WS 持仓推送可能因断线盲区/推送延迟而失真,
        // 导致本地持仓状态与交易所不一致、价格驱动重入迟迟不触发。
@@ -575,7 +575,7 @@
        if ((state == StrategyState.ACTIVE || state == StrategyState.OPENING)
                && System.currentTimeMillis() - lastPositionSyncTime >= POSITION_SYNC_INTERVAL_MS) {
            lastPositionSyncTime = System.currentTimeMillis();
            executor.submitTask(this::syncPositionsFromExchange);
            executor.submitMaintenanceTask(this::syncPositionsFromExchange);
        }
        if (state == StrategyState.ACTIVE &&
@@ -3745,7 +3745,7 @@
        if (wsClient != null) {
            wsClient.setOnAllSubscribedCallback(() -> {
                if (state == StrategyState.ACTIVE || state == StrategyState.OPENING) {
                    executor.submitTask(this::syncPositionsFromExchange);
                    executor.submitMaintenanceTask(this::syncPositionsFromExchange);
                }
            });
        }