From 6dcaa1d6d256cd7de744a04b2576111c1a7902c7 Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Fri, 12 Dec 2025 15:40:41 +0800
Subject: [PATCH] refactor(utils): 更新币种成交量键值映射规则

---
 src/main/java/com/xcong/excoin/modules/newPrice/OkxNewPriceWebSocketClient.java |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/main/java/com/xcong/excoin/modules/newPrice/OkxNewPriceWebSocketClient.java b/src/main/java/com/xcong/excoin/modules/newPrice/OkxNewPriceWebSocketClient.java
index 4b1200a..8efb877 100644
--- a/src/main/java/com/xcong/excoin/modules/newPrice/OkxNewPriceWebSocketClient.java
+++ b/src/main/java/com/xcong/excoin/modules/newPrice/OkxNewPriceWebSocketClient.java
@@ -46,7 +46,11 @@
     private static final String CHANNEL_OPEN_INTEREST = "open-interest";
 
     private static final String[] INST_IDS = {
-            "EOS-USDT","BTC-USDT", "ETH-USDT", "XRP-USDT", "LTC-USDT", "BCH-USDT", "ETC-USDT"
+            "BTC-USDT", "ETH-USDT", "XRP-USDT", "LTC-USDT", "BCH-USDT", "ETC-USDT"
+    };
+    //BTC-USDT-SWAP
+    private static final String[] INST_IDS_INTEREST = {
+            "BTC-USDT-SWAP", "ETH-USDT-SWAP", "XRP-USDT-SWAP", "LTC-USDT-SWAP", "BCH-USDT-SWAP", "ETC-USDT-SWAP"
     };
 
     // 心跳超时时间(秒),小于30秒
@@ -189,7 +193,7 @@
         subscribeMsg.put("op", "subscribe");
 
         JSONArray argsArray = new JSONArray();
-        for (String instId : INST_IDS) {
+        for (String instId : INST_IDS_INTEREST) {
             JSONObject arg = new JSONObject();
             arg.put("channel", CHANNEL_OPEN_INTEREST);
             arg.put("instId", instId);
@@ -322,11 +326,6 @@
 
                             String redisKey = "volume:" + buildRedisKey(instId);
                             redisUtils.set(redisKey, oiUsd);
-
-                            String symbol = CoinTypeConvert.okxConvert(instId);
-                            if (symbol != null) {
-                                redisUtils.set(CoinTypeConvert.convertToVolumeKey(symbol), oiUsd);
-                            }
 
                             log.debug("更新持仓量: {} = {}, 时间: {}", redisKey, oiUsd, ts);
                         } catch (Exception innerEx) {

--
Gitblit v1.9.1