public async Task GetAggregateTradesThrows() { var now = DateTimeOffset.UtcNow; var startTime = DateTimeOffset.UtcNow.AddHours(-25).ToUnixTimeMilliseconds(); var endTime = now.ToUnixTimeMilliseconds(); await Assert.ThrowsAsync <ArgumentNullException>("symbol", () => _client.GetAggregateTradesAsync(null)); await Assert.ThrowsAsync <ArgumentException>("endTime", () => _client.GetAggregateTradesAsync(Symbol.BTC_USDT, startTime: startTime, endTime: endTime)); }
public async Task GetAggregateTrades() { var now = DateTimeOffset.UtcNow; var json = await _api.GetAggregateTradesAsync(Symbol.BTC_USDT, 0, 1); Assert.True(IsJsonArray(json)); json = await _api.GetAggregateTradesAsync(Symbol.BTC_USDT, startTime : now.AddMinutes(-1).ToUnixTimeMilliseconds(), endTime : now.ToUnixTimeMilliseconds()); Assert.True(IsJsonArray(json)); }
public async Task GetAggregateTradesThrows() { await Assert.ThrowsAsync <ArgumentNullException>("symbol", () => _client.GetAggregateTradesAsync(null)); }