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 if Option["datacenter"] == "bittrex" { marketAPI = Bittrex.Manager() } 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 if Option["tradecenter"] == "bittrex" { tradeAPI = Bittrex.Manager() } else { logger.Fatalln("Please config the exchange center...") } return }