Administrator
2025-12-10 4143a4a7be962a580eae94e530293c9eb19b4de1
feat(okxWs): 调整账户和持仓 WebSocket 配置

- 注释掉账户频道中 USDT 币种的硬编码配置
- 添加币种校验逻辑,非 USDT 币种将跳过处理
- 注释掉持仓频道中合约 ID 的硬编码配置
2 files modified
9 ■■■■ changed files
src/main/java/com/xcong/excoin/modules/okxNewPrice/okxWs/AccountWs.java 7 ●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/okxNewPrice/okxWs/PositionsWs.java 2 ●●● patch | view | raw | blame | history
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);
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);