public void GetWithdrawalHistory_ShouldNotThrowException() { var bittrex = new Bittrex(DefaultApiKey, DefaultApiSecret); Func <Task> action = async() => { var _ = await bittrex.GetWithdrawalHistory(); }; action.ShouldNotThrow(); }
public void GetWithdrawalHistory_ShouldUnauthorizedThrowException_IfNoApiKeyIsGiven() { var bittrex = new Bittrex(); Func <Task> action = async() => { var _ = await bittrex.GetWithdrawalHistory(); }; action.ShouldThrow <UnauthorizedException>(); }
public async Task <List <Withdrawal> > GetNewWithdrawals() { var list = await _exchange.GetWithdrawalHistory(); var localWithdrawals = list.Select(Mapper.Map <Withdrawal>).ToList(); var newWithdrawals = await _databaseService.AddWithdrawals(localWithdrawals, Constants.Bittrex); await _databaseService.AddLastChecked("Bittrex.WithdrawalCheck", DateTime.Now); return(newWithdrawals); }