public async Task GetOrders_ReturnsOrders() { // Arrange var options = CreateOptions(); var httpClient = new HttpClient(); var client = new BotsOrderApi(options, httpClient); // Act var result = await client.GetOrders(); // Assert result.Should().NotBeNull(); }
public async Task CancelAllOpenOrders() { // Arrange var options = CreateOptions(); var httpClient = new HttpClient(); var client = new BotsOrderApi(options, httpClient); // Act var result = await client.GetOrders(); foreach (var order in result.Orders) { var cancelOrderResult = await client.CancelOrder(new CancelOrderRequest { ExternalOrderId = order.ExternalId }); cancelOrderResult.Success.Should().BeTrue(); } // Assert result.Should().NotBeNull(); }