From eb57c7469fdf513c152b2782b04003647b54ba1e Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Thu, 11 Dec 2025 16:24:33 +0800
Subject: [PATCH] feat(okx): 优化账户状态处理逻辑
---
src/main/java/com/xcong/excoin/modules/okxNewPrice/okxWs/TradeOrderWs.java | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/main/java/com/xcong/excoin/modules/okxNewPrice/okxWs/TradeOrderWs.java b/src/main/java/com/xcong/excoin/modules/okxNewPrice/okxWs/TradeOrderWs.java
index 093ac5e..38e0cd3 100644
--- a/src/main/java/com/xcong/excoin/modules/okxNewPrice/okxWs/TradeOrderWs.java
+++ b/src/main/java/com/xcong/excoin/modules/okxNewPrice/okxWs/TradeOrderWs.java
@@ -34,12 +34,13 @@
String buyCntNormal = getRedisValue(redisUtils, PositionsWs.POSITIONSWS_CHANNEL, ":buyCnt");
String pos = getRedisValue(redisUtils, PositionsWs.POSITIONSWS_CHANNEL, ":pos");
if (OrderParamEnums.ORDERING.getValue().equals(side)) {
+ log.warn("正在下单中,等待下单结束...");
return;
} else if (OrderParamEnums.HOLDING.getValue().equals(side)) {
return;
} else if (OrderParamEnums.INIT.getValue().equals(side)) {
side = OrderParamEnums.BUY.getValue();
- if (StrUtil.isNotBlank(buyCntNormal) && BigDecimal.ZERO.compareTo(new BigDecimal(buyCntNormal)) > 0) {
+ if (StrUtil.isNotBlank(buyCntNormal) && new BigDecimal(buyCntNormal).compareTo(BigDecimal.ZERO) > 0) {
buyCnt = buyCntNormal;
}else{
buyCnt = ctval;
@@ -50,7 +51,7 @@
buyCnt = pos;
} else if (OrderParamEnums.BUY.getValue().equals(side)){
side = OrderParamEnums.BUY.getValue();
- if (StrUtil.isNotBlank(buyCntNormal) && BigDecimal.ZERO.compareTo(new BigDecimal(buyCntNormal)) > 0) {
+ if (StrUtil.isNotBlank(buyCntNormal) && new BigDecimal(buyCntNormal).compareTo(BigDecimal.ZERO) > 0) {
buyCnt = buyCntNormal;
}else{
buyCnt = ctval;
--
Gitblit v1.9.1