Example #1
0
        private void Betting()
        {
            SingleBetData data = new SingleBetData
            {
                Session    = session,
                PayIn      = -0.000000001m,
                Currency   = Currencies.Doge,
                ClientSeed = new Random().Next(),
                Repit      = 2,
                Drawdoun   = 33,
                GessLow    = 0,
                GessHigh   = 249749,
                PercentMax = 249749,
                PercentMin = 249000
                             //Repit = 9,
                             //Drawdoun = 150,
                             //GessLow = 0,
                             //GessHigh = 54900,
                             //PercentMax = 54900,
                             //PercentMin = 53900
            };

            data.PayIn = data.SetBaseBet();
            singleCycle.StartBet(data);
        }
        private void ProcessResult(BetResultData data, SingleBetData bet)
        {
            if (data.Balance > bet.ProfitEdge)
            {
                decimal minProfitToWitdraw = 0;
                switch (bet.Currency)
                {
                case Currencies.BTC:
                {
                    minProfitToWitdraw = Math.Max(data.Balance - bet.ProfitEdge, 0.0005m);
                }
                break;

                case Currencies.Doge:
                {
                    minProfitToWitdraw = Math.Max(data.Balance - bet.ProfitEdge, 2m);
                }
                break;

                case Currencies.LTC:
                {
                    minProfitToWitdraw = Math.Max(data.Balance - bet.ProfitEdge, 0.002m);
                }
                break;

                case Currencies.ETH:
                {
                    minProfitToWitdraw = Math.Max(data.Balance - bet.ProfitEdge, 0.002m);
                }
                break;
                }

                DiceWebAPI.Withdraw(bet.Session, minProfitToWitdraw, bet.AccountToSendProfit, bet.Currency);
            }
            _settings.UserBalance += data.Profit;
            bet.PayIn              = bet.SetBaseBet(_settings);
        }