public void GDAXPlaceRestTrade_QueryRestTrade_CancelRestTrade_Test() { // Arrange IFileRepository fileRepo = new FileRepository(); var apiInfo = fileRepo.GetConfig(); IGdaxRepository repo = new GdaxRepository(); repo.SetExchangeApi(apiInfo, false); _gdaxTradeParams = new GDAXTradeParams { side = "sell", price = 6285.76M, size = 0.01984100M, product_id = "BTC-USD" }; // Act var response = repo.PlaceRestTrade(_gdaxTradeParams).Result; // Assert Assert.True(response != null); // Act var orderResponse = repo.GetRestOrder(response.id).Result; // Assert Assert.True(orderResponse != null); // Act var cancelResponse = repo.CancelAllTradesRest().Result; // Assert Assert.True(cancelResponse == null); }
public void GetStats_Test() { IGdaxRepository repo = new GdaxRepository(); repo.SetExchangeApi(_exchangeApi); var pair = "BTCUSD"; var response = repo.GetStats(pair).Result; Assert.True(response != null); }
public void GetGdaxTrades_Test() { IGdaxRepository repo = new GdaxRepository(); repo.SetExchangeApi(_exchangeApi); var pair = "BTCUSD"; var trades = repo.GetTrades(pair).Result; Assert.True(trades != null); }
public void GetGdaxOrderBook_Test() { IGdaxRepository repo = new GdaxRepository(); repo.SetExchangeApi(_exchangeApi); var pair = "BTCUSD"; var orderBook = repo.GetOrderBook(pair).Result; Assert.True(orderBook != null); }
public void GetGdaxBalances_Test() { IFileRepository fileRepo = new FileRepository(); var apiInfo = fileRepo.GetConfig(); IGdaxRepository repo = new GdaxRepository(); repo.SetExchangeApi(apiInfo, true); var accounts = repo.GetBalance().Result; Assert.True(accounts != null); }
public void GDAXCancelAllTradesRest_Test() { IFileRepository fileRepo = new FileRepository(); var apiInfo = fileRepo.GetConfig(); IGdaxRepository repo = new GdaxRepository(); repo.SetExchangeApi(apiInfo, false); var response = repo.CancelAllTradesRest().Result; Assert.True(response == null); }
public void GDAXPlaceTradeStopLoss_Test() { IFileRepository fileRepo = new FileRepository(); var apiInfo = fileRepo.GetConfig(); IGdaxRepository repo = new GdaxRepository(); repo.SetExchangeApi(apiInfo, true); var response = repo.PlaceStopLimit(_tradeParams).Result; Assert.True(response != null); }
public void GetGdaxOrders_Test() { IFileRepository fileRepo = new FileRepository(); var apiInfo = fileRepo.GetConfig(); IGdaxRepository repo = new GdaxRepository(); repo.SetExchangeApi(apiInfo, false); var orders = repo.GetRestOrders().Result; Assert.True(orders != null); }
public void GetGdaxCandlestick_Test() { IGdaxRepository repo = new GdaxRepository(); repo.SetExchangeApi(_exchangeApi); var pair = "BTCUSD"; var stickCount = 0; var granularity = CandleGranularity.Minutes1; var candleSticks = repo.GetCandleSticks(pair, stickCount, granularity).Result.ToList(); Assert.True(candleSticks.Count > 0); }
public void GDAXPlaceTrade_Test() { IFileRepository fileRepo = new FileRepository(); var apiInfo = fileRepo.GetConfig(); IGdaxRepository repo = new GdaxRepository(); repo.SetExchangeApi(apiInfo, false); _tradeParams = new TradeParams { side = "sell", price = 100000.00M, quantity = 0.01984100M, symbol = "BTC-USD" }; var response = repo.PlaceTrade(_tradeParams).Result; Assert.True(response != null); }