Administrator
5 days ago 04063bcb7b9e9d8e0242c1313f54ccc1b71f0b6e
src/main/java/com/xcong/excoin/modules/okxApi/wsHandler/handler/OrdersOkxChannelHandler.java
@@ -2,8 +2,8 @@
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.xcong.excoin.modules.okxApi.IOkxStrategy;
import com.xcong.excoin.modules.okxApi.OkxConfig;
import com.xcong.excoin.modules.okxApi.OkxGridTradeService;
import com.xcong.excoin.modules.okxApi.wsHandler.AbstractOkxPrivateChannelHandler;
import lombok.extern.slf4j.Slf4j;
import org.java_websocket.client.WebSocketClient;
@@ -70,14 +70,14 @@
    /**
     * 构造订单频道处理器。
     *
     * @param config           OKX 配置实例
     * @param gridTradeService OKX 网格交易策略服务实例
     * @param config   OKX 配置实例
     * @param strategy OKX 交易策略服务实例
     */
    public OrdersOkxChannelHandler(OkxConfig config, OkxGridTradeService gridTradeService) {
    public OrdersOkxChannelHandler(OkxConfig config, IOkxStrategy strategy) {
        super(CHANNEL_NAME,
                config.getApiKey(), config.getApiSecret(), config.getPassphrase(),
                config.getContract(),
                gridTradeService);
                strategy);
        this.config = config;
    }
@@ -141,8 +141,8 @@
                log.info("[OKX-WS] orders fill, algoId:{}, state:filled, orderType:{}, side:{}, posSide:{}, fillSz:{}, tradeId:{}",
                        algoId, orderType, side, posSide, fillSz, tradeId);
                if (getGridTradeService() != null) {
                    getGridTradeService().onAutoOrder(algoId, "finished", state, orderType, tradeId);
                if (getStrategy() != null) {
                    getStrategy().onAutoOrder(algoId, "finished", state, orderType, tradeId);
                }
            }
        } catch (Exception e) {