Files
exchange_go/config/serverinit/binance_spot_init.go
2025-02-06 11:14:33 +08:00

31 lines
586 B
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package serverinit
import (
"go-admin/models"
"go-admin/pkg/utility"
"go-admin/services/binanceservice"
"go-admin/services/spotservice"
"os"
)
/*
初始化-币安现货交易对24h行情
*/
func SpotCurrencyInit() (map[string]models.TradeSet, []string) {
result, symbols, err := binanceservice.GetSpotSymbols()
if err != nil {
os.Exit(-1)
}
return result, symbols
}
/*
初始化现货订阅
- @workType 工作类型 normal-正常任务trigger-主动触发
*/
func SpotSubscribeInit(workType string) {
utility.SafeGoParam(spotservice.StartBinanceProWs, workType)
}