From 4143a4a7be962a580eae94e530293c9eb19b4de1 Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Wed, 10 Dec 2025 17:16:03 +0800
Subject: [PATCH] feat(okxWs): 调整账户和持仓 WebSocket 配置
---
src/main/java/com/xcong/excoin/modules/okxNewPrice/okxWs/PositionsWs.java | 2 +-
src/main/java/com/xcong/excoin/modules/okxNewPrice/okxWs/AccountWs.java | 7 ++++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/main/java/com/xcong/excoin/modules/okxNewPrice/okxWs/AccountWs.java b/src/main/java/com/xcong/excoin/modules/okxNewPrice/okxWs/AccountWs.java
index bec2d87..5169c11 100644
--- a/src/main/java/com/xcong/excoin/modules/okxNewPrice/okxWs/AccountWs.java
+++ b/src/main/java/com/xcong/excoin/modules/okxNewPrice/okxWs/AccountWs.java
@@ -52,7 +52,7 @@
JSONArray argsArray = new JSONArray();
JSONObject args = new JSONObject();
args.put("channel", ACCOUNTWS_CHANNEL);
- args.put(CCY_KEY, CoinEnums.USDT.getCode());
+// args.put(CCY_KEY, CoinEnums.USDT.getCode());
JSONObject updateInterval = new JSONObject();
updateInterval.put("updateInterval",CoinEnums.UPDATEINTERVAL.getCode());
args.put("extraParams", updateInterval);
@@ -97,6 +97,11 @@
JSONObject detail = detailsArray.getJSONObject(j);
String ccy = detail.getString(CCY_KEY);
+ if (!CoinEnums.USDT.getCode().equals(ccy)) {
+ log.warn("账户频道币种不匹配,跳过处理");
+ continue;
+ }
+
String availBalStr = detail.getString(AVAIL_BAL_KEY);
String cashBalStr = detail.getString(CASH_BAL_KEY);
String eq = detail.getString(EQ_KEY);
diff --git a/src/main/java/com/xcong/excoin/modules/okxNewPrice/okxWs/PositionsWs.java b/src/main/java/com/xcong/excoin/modules/okxNewPrice/okxWs/PositionsWs.java
index be35f0e..3a53134 100644
--- a/src/main/java/com/xcong/excoin/modules/okxNewPrice/okxWs/PositionsWs.java
+++ b/src/main/java/com/xcong/excoin/modules/okxNewPrice/okxWs/PositionsWs.java
@@ -31,7 +31,7 @@
JSONObject args = new JSONObject();
args.put("channel", POSITIONSWS_CHANNEL);
args.put("instType", CoinEnums.INSTTYPE_SWAP.getCode());
- args.put("instId", CoinEnums.HE_YUE.getCode());
+// args.put("instId", CoinEnums.HE_YUE.getCode());
JSONObject updateInterval = new JSONObject();
updateInterval.put("updateInterval",CoinEnums.UPDATEINTERVAL.getCode());
args.put("extraParams", updateInterval);
--
Gitblit v1.9.1