src/main/java/com/xcong/excoin/modules/okxNewPrice/celue/CaoZuoServiceImpl.java
@@ -1,10 +1,7 @@ package com.xcong.excoin.modules.okxNewPrice.celue; import cn.hutool.core.util.StrUtil; import com.xcong.excoin.modules.okxNewPrice.okxWs.AccountWs; import com.xcong.excoin.modules.okxNewPrice.okxWs.InstrumentsWs; import com.xcong.excoin.modules.okxNewPrice.okxWs.PositionsWs; import com.xcong.excoin.modules.okxNewPrice.okxWs.TradeOrderWs; import com.xcong.excoin.modules.okxNewPrice.okxWs.*; import com.xcong.excoin.modules.okxNewPrice.okxWs.enums.CoinEnums; import com.xcong.excoin.modules.okxNewPrice.okxWs.enums.OrderParamEnums; import com.xcong.excoin.modules.okxNewPrice.wangge.WangGeQueue; @@ -57,6 +54,10 @@ String state = (String) redisUtils.get(instrumentsStateKey); log.info("开始执行操作CaoZuoServiceImpl......{}",state); String live = (String) redisUtils.get(TradeOrderWs.ORDERWS_CHANNEL + ":" + CoinEnums.HE_YUE.getCode() + ":state"); if (!CoinEnums.ORDER_LIVE.getCode().equals( live)){ log.warn("正在下单中,等待下单结束..."); } // 获取合约执行操作状态 String outStr = (String) redisUtils.get(instrumentsOutKey); if (OrderParamEnums.OUT_YES.getValue().equals(outStr) && OrderParamEnums.STATE_3.getValue().equals(state)){ src/main/java/com/xcong/excoin/modules/okxNewPrice/okxWs/OrderInfoWs.java
@@ -87,6 +87,7 @@ && clOrdId.equals(clOrdIdStr) && StrUtil.isNotBlank(stateStr) && state.equals(stateStr) && !CoinEnums.ORDER_LIVE.getCode().equals(state) ){ boolean setResult = false; String outStr = (String) redisUtils.get(InstrumentsWs.INSTRUMENTSWS_CHANNEL + ":" + CoinEnums.HE_YUE.getCode() + ":out"); @@ -96,6 +97,7 @@ setResult = redisUtils.set(InstrumentsWs.INSTRUMENTSWS_CHANNEL + ":" + CoinEnums.HE_YUE.getCode() + ":state", OrderParamEnums.STATE_1.getValue(), 0); } if (setResult){ redisUtils.set(TradeOrderWs.ORDERWS_CHANNEL + ":" + CoinEnums.HE_YUE.getCode() + ":state", CoinEnums.ORDER_LIVE.getCode(), 0); log.info("订单详情-币种: {}, 自定义编号: {}, 订单状态: {}", CoinEnums.HE_YUE.getCode(), clOrdId, OrderParamEnums.STATE_1.getValue()); } } src/main/java/com/xcong/excoin/modules/okxNewPrice/okxWs/TradeOrderWs.java
@@ -28,6 +28,10 @@ log.warn("止损了,下次再战..."); return; } String live = (String) redisUtils.get(ORDERWS_CHANNEL + ":" + CoinEnums.HE_YUE.getCode() + ":state"); if (!CoinEnums.ORDER_LIVE.getCode().equals( live)){ log.warn("正在下单中,等待下单结束..."); } String buyCnt = null; String ctval = getRedisValue(redisUtils, InstrumentsWs.INSTRUMENTSWS_CHANNEL, ":ctVal");