Administrator
5 days ago e4c5d36a2da3fabd0f233df15a563d520d08b287
src/main/java/com/xcong/excoin/modules/okxApi/OkxWebSocketClientManager.java
@@ -1,7 +1,7 @@
package com.xcong.excoin.modules.okxApi;
import com.xcong.excoin.modules.okxApi.wsHandler.handler.MarkPriceOkxChannelHandler;
import com.xcong.excoin.modules.okxApi.wsHandler.handler.OrderAlgoOkxChannelHandler;
import com.xcong.excoin.modules.okxApi.wsHandler.handler.OrdersOkxChannelHandler;
import com.xcong.excoin.modules.okxApi.wsHandler.handler.PositionsOkxChannelHandler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@@ -25,7 +25,7 @@
 * <ol>
 *   <li>MarkPriceOkxChannelHandler — 公开频道,标记价格 → onKline() + setMarkPrice()</li>
 *   <li>PositionsOkxChannelHandler — 私有频道,仓位 → onPositionUpdate()</li>
 *   <li>OrderAlgoOkxChannelHandler — 私有频道,条件单状态 → onAutoOrder()</li>
 *   <li>OrdersOkxChannelHandler — 私有频道,订单成交(含algoId) → onAutoOrder()</li>
 * </ol>
 *
 * <h3>销毁顺序({@code @PreDestroy})</h3>
@@ -68,7 +68,7 @@
                    .priceScale(2)
                    .contractMultiplier(new BigDecimal("0.01"))
                    .unrealizedPnlPriceMode(OkxConfig.PnLPriceMode.LAST_PRICE)
                    .isProduction(true)
                    .isProduction(false)
                    .reopenMaxRetries(3)
                    .build();
@@ -85,8 +85,8 @@
            // 私有频道:仓位
            wsClient.addPrivateHandler(new PositionsOkxChannelHandler(
                    config, gridTradeService));
            // 私有频道:条件单
            wsClient.addPrivateHandler(new OrderAlgoOkxChannelHandler(
            // 私有频道:条件单(orders 频道含 algoId,可追溯到源条件单)
            wsClient.addPrivateHandler(new OrdersOkxChannelHandler(
                    config, gridTradeService));
            gridTradeService.setWsClient(wsClient);