Administrator
4 days ago 04063bcb7b9e9d8e0242c1313f54ccc1b71f0b6e
src/main/java/com/xcong/excoin/modules/okxApi/wsHandler/AbstractOkxPrivateChannelHandler.java
@@ -2,7 +2,7 @@
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.xcong.excoin.modules.okxApi.OkxGridTradeService;
import com.xcong.excoin.modules.okxApi.IOkxStrategy;
import lombok.extern.slf4j.Slf4j;
import org.java_websocket.client.WebSocketClient;
@@ -54,8 +54,8 @@
    /** 交易对标识,如 "ETH-USDT-SWAP" */
    private final String instId;
    /** 网格交易服务实例 */
    private final OkxGridTradeService gridTradeService;
    /** 策略服务实例 */
    private final IOkxStrategy strategy;
    /** 订阅确认状态 */
    private volatile boolean subscribed = false;
@@ -63,24 +63,24 @@
    /**
     * 构造私有频道处理器。
     *
     * @param channelName      频道名称(如 "positions"、"orders-algo")
     * @param apiKey           OKX API Key
     * @param apiSecret        OKX API Secret
     * @param passphrase       OKX API Passphrase
     * @param instId           交易对标识(如 "ETH-USDT-SWAP")
     * @param gridTradeService 网格交易服务实例
     * @param channelName 频道名称(如 "positions"、"orders-algo")
     * @param apiKey      OKX API Key
     * @param apiSecret   OKX API Secret
     * @param passphrase  OKX API Passphrase
     * @param instId      交易对标识(如 "ETH-USDT-SWAP")
     * @param strategy    OKX 交易策略服务实例
     */
    public AbstractOkxPrivateChannelHandler(String channelName,
                                             String apiKey, String apiSecret,
                                             String passphrase,
                                             String instId,
                                             OkxGridTradeService gridTradeService) {
                                             IOkxStrategy strategy) {
        this.channelName = channelName;
        this.apiKey = apiKey;
        this.apiSecret = apiSecret;
        this.passphrase = passphrase;
        this.instId = instId;
        this.gridTradeService = gridTradeService;
        this.strategy = strategy;
    }
    /**
@@ -140,10 +140,10 @@
    }
    /**
     * @return 网格交易服务实例
     * @return 策略服务实例
     */
    protected OkxGridTradeService getGridTradeService() {
        return gridTradeService;
    protected IOkxStrategy getStrategy() {
        return strategy;
    }
    // ==================== 订阅状态 ====================