From e9a397babbbfa9cff8a5ed026447d585e739c37f Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Tue, 12 May 2026 21:47:21 +0800
Subject: [PATCH] refactor(gateApi): 将网格交易策略从限价单改为条件单
---
src/main/java/com/xcong/excoin/modules/gateApi/GateWebSocketClientMain.java | 21 ++++++++++++++-------
1 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/src/main/java/com/xcong/excoin/modules/gateApi/GateWebSocketClientMain.java b/src/main/java/com/xcong/excoin/modules/gateApi/GateWebSocketClientMain.java
index 604f2bc..6725789 100644
--- a/src/main/java/com/xcong/excoin/modules/gateApi/GateWebSocketClientMain.java
+++ b/src/main/java/com/xcong/excoin/modules/gateApi/GateWebSocketClientMain.java
@@ -1,19 +1,26 @@
package com.xcong.excoin.modules.gateApi;
-import com.xcong.excoin.modules.okxNewPrice.OkxWebSocketClientManager;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
+/**
+ * Gate 网格交易的独立测试入口(main 方法)。
+ * 通过 Spring XML 上下文初始化管理器,运行一段时间后手动关闭。
+ *
+ * @author Administrator
+ */
public class GateWebSocketClientMain {
+ /**
+ * 独立启动入口:加载 Spring 上下文 → 获取管理器 Bean → 长时间运行 → 销毁。
+ *
+ * @param args 命令行参数(未使用)
+ */
public static void main(String[] args) throws InterruptedException {
- // 使用Spring上下文初始化管理器
ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
GateWebSocketClientManager manager = context.getBean(GateWebSocketClientManager.class);
- // 运行一段时间以观察结果
- Thread.sleep(1200000000L); // 运行一小时
-
- // 关闭连接
+ Thread.sleep(1200000000L);
+
manager.destroy();
}
-}
\ No newline at end of file
+}
--
Gitblit v1.9.1