1、有更新,还没测完,暂时归档
This commit is contained in:
@ -57,7 +57,7 @@ func BinanceMarketInit() error {
|
||||
FuturesInit()
|
||||
|
||||
//现货 订阅
|
||||
// SpotSubscribeInit("normal")
|
||||
SpotSubscribeInit("normal")
|
||||
//合约订阅
|
||||
futureservice.StartBinanceProWs("normal")
|
||||
// log.Info("订阅合约-开始")
|
||||
|
||||
@ -47,20 +47,20 @@ func UserSubscribeInit(orm *gorm.DB, ctx context.Context) {
|
||||
|
||||
//移除连接
|
||||
for _, item := range deleteKeys {
|
||||
// 停止并删除现货连接
|
||||
if wm, ok := excservice.SpotSockets[item]; ok {
|
||||
wm.Stop()
|
||||
|
||||
delete(excservice.FutureSockets, item)
|
||||
}
|
||||
|
||||
if wm, ok := excservice.SpotSockets[item]; ok {
|
||||
wm.Stop()
|
||||
|
||||
delete(excservice.SpotSockets, item)
|
||||
}
|
||||
|
||||
// 停止并删除合约连接
|
||||
if wm, ok := excservice.FutureSockets[item]; ok {
|
||||
wm.Stop()
|
||||
delete(excservice.FutureSockets, item)
|
||||
}
|
||||
|
||||
if _, err := helper.DefaultRedis.LRem(rediskey.ApiUserDeleteList, item); err != nil {
|
||||
log.Error("移除 待关闭websocket 失败:", err)
|
||||
log.Errorf("移除待关闭websocket失败: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -65,6 +65,16 @@ settings:
|
||||
spotRestURL: "https://api.binance.com"
|
||||
futRestURL: "https://fapi.binance.com"
|
||||
|
||||
#Bitget配置
|
||||
bitgetSet:
|
||||
restURL: "https://api.bitget.com"
|
||||
wsURL: "wss://ws.bitget.com/mix/v1/stream"
|
||||
apiKey: "bg_b205e9eda303b5e579041b2e979bdbe7"
|
||||
secretKey: "dbdd0f8cdac203da340537de791691e2506a6f25f8d1d11b05afb9c121fa5dd1"
|
||||
passphrase: "aa123456"
|
||||
timeoutSecond: 30
|
||||
signType: "SHA256"
|
||||
|
||||
# 邮箱发送配置
|
||||
emailConfig:
|
||||
mail_smtp_host: "smtp.163.com"
|
||||
|
||||
Reference in New Issue
Block a user