From 84d454b0d772cd59d32d08f5a1db1ac8ef24eed3 Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Wed, 17 Dec 2025 12:44:25 +0800
Subject: [PATCH] feat(okxNewPrice): 添加日志记录以增强调试信息
---
src/main/java/com/xcong/excoin/modules/okxNewPrice/celue/CaoZuoServiceImpl.java | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/xcong/excoin/modules/okxNewPrice/celue/CaoZuoServiceImpl.java b/src/main/java/com/xcong/excoin/modules/okxNewPrice/celue/CaoZuoServiceImpl.java
index efe2443..bf8b556 100644
--- a/src/main/java/com/xcong/excoin/modules/okxNewPrice/celue/CaoZuoServiceImpl.java
+++ b/src/main/java/com/xcong/excoin/modules/okxNewPrice/celue/CaoZuoServiceImpl.java
@@ -52,6 +52,7 @@
return null;
}
String markPx = ObjectUtil.isEmpty(redisUtils.getString(CoinEnums.HE_YUE.getCode())) ? "0" : redisUtils.getString(CoinEnums.HE_YUE.getCode());
+ log.info("当前价格: {}", markPx);
WangGeListEnum gridByPrice = WangGeListEnum.getGridByPrice(new BigDecimal(markPx));
if (gridByPrice == null){
log.error("没有获取到网格参数......");
@@ -176,6 +177,7 @@
// 处理订单价格在队列中的情况
String orderPrice = OrderInfoWs.getAccountMap(accountName).get("orderPrice");
+ log.info("订单价格: {}", orderPrice);
handleOrderPriceInQueues(orderPrice, queueKaiCang, queuePingCang);
// 判断是加仓还是减仓
if (avgPx.compareTo(markPx) > 0) {
@@ -186,6 +188,7 @@
return OrderParamEnums.HOLDING.getValue();
}
DescBigDecimal kaiCang = queueKaiCang.peek();
+ log.info("下限队列价格{}", kaiCang);
if (kaiCang != null && markPx.compareTo(kaiCang.getValue()) <= 0 && avgPx.compareTo(kaiCang.getValue()) >= 0) {
log.info("开始加仓...下限队列价格大于当前价格{}>{}", kaiCang.getValue(), markPx);
WsMapBuild.saveStringToMap(OrderInfoWs.getAccountMap(accountName), "orderPrice", String.valueOf(markPx));
@@ -209,6 +212,7 @@
return OrderParamEnums.HOLDING.getValue();
}
AscBigDecimal pingCang = queuePingCang.peek();
+ log.info("上限队列价格:{}", pingCang.getValue());
if (pingCang != null && avgPx.compareTo(pingCang.getValue()) < 0) {
log.info("开始减仓...上限队列价格大于开仓价格{}>{}", pingCang.getValue(), avgPx);
// 手续费
@@ -276,6 +280,7 @@
// 处理订单价格在队列中的情况
String orderPrice = OrderInfoWs.getAccountMap(accountName).get("orderPrice");
+ log.info("订单价格:{}", orderPrice);
handleOrderPriceInQueues(orderPrice, queueKaiCang, queuePingCang);
// 判断是加仓还是减仓
if (avgPx.compareTo(markPx) > 0) {
@@ -286,6 +291,7 @@
return OrderParamEnums.HOLDING.getValue();
}
DescBigDecimal kaiCang = queueKaiCang.peek();
+ log.info("下限队列价格{}", kaiCang);
if (kaiCang != null && avgPx.compareTo(kaiCang.getValue()) >= 0) {
log.info("开始减仓...下限队列价格小于开仓价格{}<{}", kaiCang.getValue(), avgPx);
@@ -334,6 +340,7 @@
return OrderParamEnums.HOLDING.getValue();
}
AscBigDecimal pingCang = queuePingCang.peek();
+ log.info("上限队列价格: {}", pingCang);
if (pingCang != null && markPx.compareTo(pingCang.getValue()) >= 0 && avgPx.compareTo(pingCang.getValue()) < 0) {
log.info("开始加仓...上限队列价格小于当前价格{}<={}", pingCang.getValue(), markPx);
WsMapBuild.saveStringToMap(OrderInfoWs.getAccountMap(accountName), "orderPrice", String.valueOf(markPx));
--
Gitblit v1.9.1