예제 #1
0
        public void GetWithdrawalHistory_ShouldNotThrowException()
        {
            var         bittrex = new Bittrex(DefaultApiKey, DefaultApiSecret);
            Func <Task> action  = async() => { var _ = await bittrex.GetWithdrawalHistory(); };

            action.ShouldNotThrow();
        }
예제 #2
0
        public void GetWithdrawalHistory_ShouldUnauthorizedThrowException_IfNoApiKeyIsGiven()
        {
            var         bittrex = new Bittrex();
            Func <Task> action  = async() => { var _ = await bittrex.GetWithdrawalHistory(); };

            action.ShouldThrow <UnauthorizedException>();
        }
예제 #3
0
        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);
        }