From ede6503c3e11c4ca71ceb1d23bc4781155e9a043 Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Sat, 09 May 2026 16:15:54 +0800
Subject: [PATCH] fix(gateApi): 修正网格交易服务日志输出和调试信息
---
src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java b/src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java
index 7bc38fa..32c8dd0 100644
--- a/src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java
+++ b/src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java
@@ -362,10 +362,11 @@
}
}
}
+ log.info("[Gate] 原空队列:{}", shortPriceQueue);
if (matched.isEmpty()) {
+ log.info("[Gate] 空仓队列未触发, 当前价:{}", currentPrice);
return;
}
-
log.info("[Gate] 空仓队列触发, 匹配{}个元素, 当前价:{}", matched.size(), currentPrice);
if (!isMarginSafe()) {
log.warn("[Gate] 保证金超限,跳过空单开仓");
@@ -383,7 +384,7 @@
}
shortPriceQueue.sort(BigDecimal::compareTo);
- log.info("[Gate] 空队列:{}", shortPriceQueue);
+ log.info("[Gate] 现空队列:{}", shortPriceQueue);
}
synchronized (longPriceQueue) {
@@ -392,8 +393,6 @@
while (longPriceQueue.size() > config.getGridQueueSize()) {
longPriceQueue.remove(longPriceQueue.size() - 1);
}
-
- log.info("[Gate] 多队列:{}", shortPriceQueue);
}
}
@@ -408,7 +407,9 @@
}
}
}
+ log.info("[Gate] 原多队列:{}", longPriceQueue);
if (matched.isEmpty()) {
+ log.info("[Gate] 多仓队列未触发, 当前价:{}", currentPrice);
return;
}
@@ -429,7 +430,7 @@
}
longPriceQueue.sort(BigDecimal::compareTo);
- log.info("[Gate] 多队列:{}", shortPriceQueue);
+ log.info("[Gate] 现多队列:{}", longPriceQueue);
}
synchronized (shortPriceQueue) {
@@ -438,8 +439,6 @@
while (shortPriceQueue.size() > config.getGridQueueSize()) {
shortPriceQueue.remove(shortPriceQueue.size() - 1);
}
-
- log.info("[Gate] 空队列:{}", shortPriceQueue);
}
}
--
Gitblit v1.9.1