From 0f3d23847ceda5fc72bb6a971ffdfaf881631b95 Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Wed, 07 Jan 2026 14:26:48 +0800
Subject: [PATCH] fix(okxNewPrice): 修复止损逻辑并添加价格比较日志
---
src/main/java/com/xcong/excoin/modules/okxNewPrice/OkxWebSocketClientManager.java | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/main/java/com/xcong/excoin/modules/okxNewPrice/OkxWebSocketClientManager.java b/src/main/java/com/xcong/excoin/modules/okxNewPrice/OkxWebSocketClientManager.java
index 21dc07e..21b96ab 100644
--- a/src/main/java/com/xcong/excoin/modules/okxNewPrice/OkxWebSocketClientManager.java
+++ b/src/main/java/com/xcong/excoin/modules/okxNewPrice/OkxWebSocketClientManager.java
@@ -2,6 +2,7 @@
import com.xcong.excoin.modules.okxNewPrice.celue.CaoZuoService;
import com.xcong.excoin.modules.okxNewPrice.okxWs.enums.ExchangeInfoEnum;
+import com.xcong.excoin.modules.okxNewPrice.okxWs.wanggeList.WangGeListService;
import com.xcong.excoin.modules.okxNewPrice.wangge.WangGeService;
import com.xcong.excoin.rabbit.pricequeue.WebsocketPriceService;
import com.xcong.excoin.utils.RedisUtils;
@@ -26,6 +27,8 @@
private CaoZuoService caoZuoService;
@Autowired
private RedisUtils redisUtils;
+ @Autowired
+ private WangGeListService wangGeListService;
// 存储所有OkxQuantWebSocketClient实例,key为账号类型名称
private final Map<String, OkxQuantWebSocketClient> quantClientMap = new ConcurrentHashMap<>();
@@ -43,7 +46,7 @@
// 初始化价格WebSocket客户端
try {
- newPriceClient = new OkxNewPriceWebSocketClient(redisUtils, caoZuoService, this);
+ newPriceClient = new OkxNewPriceWebSocketClient(redisUtils, caoZuoService, this, wangGeListService);
newPriceClient.init();
log.info("已初始化OkxNewPriceWebSocketClient");
} catch (Exception e) {
@@ -56,7 +59,7 @@
// 为每个账号创建一个WebSocket客户端实例
for (ExchangeInfoEnum account : accounts) {
try {
- OkxQuantWebSocketClient client = new OkxQuantWebSocketClient(account, redisUtils);
+ OkxQuantWebSocketClient client = new OkxQuantWebSocketClient(account, redisUtils, caoZuoService, wangGeListService);
quantClientMap.put(account.name(), client);
client.init();
log.info("已初始化账号 {} 的WebSocket客户端", account.name());
--
Gitblit v1.9.1