From 514ccbe14d855806f13c95646e8e12dd32590d58 Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Fri, 09 Jan 2026 14:51:27 +0800
Subject: [PATCH] ``` fix(okx): 切换到实盘交易配置并恢复网格交易策略
---
src/main/java/com/xcong/excoin/modules/okxNewPrice/OkxNewPriceWebSocketClient.java | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/main/java/com/xcong/excoin/modules/okxNewPrice/OkxNewPriceWebSocketClient.java b/src/main/java/com/xcong/excoin/modules/okxNewPrice/OkxNewPriceWebSocketClient.java
index 13546a2..dda2df4 100644
--- a/src/main/java/com/xcong/excoin/modules/okxNewPrice/OkxNewPriceWebSocketClient.java
+++ b/src/main/java/com/xcong/excoin/modules/okxNewPrice/OkxNewPriceWebSocketClient.java
@@ -114,7 +114,8 @@
private static final String WS_URL_MONIPAN = "wss://wspap.okx.com:8443/ws/v5/public";
private static final String WS_URL_SHIPAN = "wss://ws.okx.com:8443/ws/v5/public";
- private static final boolean isAccountType = false;
+ private static final boolean isAccountType = true;
+// private static final boolean isAccountType = false;
/**
* 建立与 OKX WebSocket 服务器的连接。
@@ -296,6 +297,8 @@
*/
private void triggerQuantOperations(String markPx) {
try {
+
+// markPx = String.valueOf(new BigDecimal(markPx).subtract(new BigDecimal("20")));
// 1. 判断当前价格属于哪个网格
WangGeListEnum gridByPriceNew = WangGeListEnum.getGridByPrice(new BigDecimal(markPx));
if (gridByPriceNew == null) {
@@ -432,9 +435,7 @@
private void sendPing() {
try {
if (webSocketClient != null && webSocketClient.isOpen()) {
- JSONObject ping = new JSONObject();
- ping.put("op", "ping");
- webSocketClient.send(ping.toJSONString());
+ webSocketClient.send("ping");
log.debug("发送ping请求");
}
} catch (Exception e) {
--
Gitblit v1.9.1