func marketAPI() (marketAPI MarketAPI) { if Option["datacenter"] == "huobi" { marketAPI = huobi.NewHuobi() } else if Option["datacenter"] == "okcoin" { marketAPI = okcoin.NewOkcoin() } else if Option["datacenter"] == "peatio" { marketAPI = peatio.NewPeatio() } else { logger.Fatalln("Please config the market center...") } return }
func tradeAPI() (tradeAPI TradeAPI) { if Option["tradecenter"] == "huobi" { tradeAPI = huobi.NewHuobi() } else if Option["tradecenter"] == "okcoin" { tradeAPI = okcoin.NewOkcoin() } else if Option["tradecenter"] == "bitvc" { tradeAPI = bitvc.NewBitvc() } else if Option["tradecenter"] == "peatio" { tradeAPI = peatio.NewPeatio() } else { logger.Fatalln("Please config the exchange center...") } return }
func marketAPI() (marketAPI MarketAPI) { logger.Infof(Option["datacenter"]) if Option["datacenter"] == "huobi" { marketAPI = huobi.NewHuobi() } else if Option["datacenter"] == "okcoin" { marketAPI = okcoin.NewOkcoin() } else if Option["datacenter"] == "peatio" { marketAPI = peatio.NewPeatio() } else if Option["datacenter"] == "bittrex" { marketAPI = Bittrex.Manager() } else { logger.Fatalln("Please config the market center...") panic(-1) } return }
func tradeAPI() (tradeAPI TradeAPI) { if Option["tradecenter"] == "huobi" { tradeAPI = huobi.NewHuobi() } else if Option["tradecenter"] == "okcoin" { tradeAPI = okcoin.NewOkcoin() } else if Option["tradecenter"] == "bitvc" { tradeAPI = bitvc.NewBitvc() } else if Option["tradecenter"] == "peatio" { tradeAPI = peatio.NewPeatio() } else if Option["tradecenter"] == "bittrex" { tradeAPI = Bittrex.Manager() } else if Option["tradecenter"] == "simulate" { tradeAPI = simulate.NewSimulate() } else { logger.Fatalln("Please config the exchange center...") panic(0) } return }