1
This commit is contained in:
30
config/serverinit/binance_spot_init.go
Normal file
30
config/serverinit/binance_spot_init.go
Normal file
@ -0,0 +1,30 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user