From 9eed388bf3c07dc0ea24fb0637b4964c8e387437 Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Mon, 22 Dec 2025 16:45:43 +0800
Subject: [PATCH] fix(symbols): 修复K线数据获取逻辑
---
src/main/java/com/xcong/excoin/modules/newPrice/ExchangeLoginService.java | 36 ++++++++++++++++++++++++++++++++++++
1 files changed, 36 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/xcong/excoin/modules/newPrice/ExchangeLoginService.java b/src/main/java/com/xcong/excoin/modules/newPrice/ExchangeLoginService.java
new file mode 100644
index 0000000..d8f0844
--- /dev/null
+++ b/src/main/java/com/xcong/excoin/modules/newPrice/ExchangeLoginService.java
@@ -0,0 +1,36 @@
+package com.xcong.excoin.modules.newPrice;
+
+
+import com.xcong.excoin.common.exception.FebsException;
+import com.xcong.excoin.modules.newPrice.impl.ExchangeLoginEventServiceImpl;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class ExchangeLoginService {
+ private final static Map<String, ExchangeLoginEventService> eventMap = new HashMap<>();
+
+ static {
+ for (ExchangeInfoEnum infoEnum : ExchangeInfoEnum.values()) {
+ eventMap.put(infoEnum.name(), new ExchangeLoginEventServiceImpl(
+ infoEnum.getApiKey(),
+ infoEnum.getSecretKey(),
+ infoEnum.getPassphrase(),
+ infoEnum.isAccountType()));
+ }
+ }
+
+ private ExchangeLoginService() {
+ }
+
+ public final static ExchangeLoginService INSTANCE = new ExchangeLoginService();
+
+ public static ExchangeLoginEventService getInstance(String exchangeType) {
+ ExchangeLoginEventService exchange = eventMap.get(exchangeType);
+ if (exchange == null) {
+ throw new FebsException("参数错误");
+ }
+
+ return exchange;
+ }
+}
--
Gitblit v1.9.1