public System.IO.Stream Create(double rubAmount, string phoneFrom, string forwardtobtc = null, int dempingpercent = 0, int forwardint = 0, string forwardfraction = "0")
        {
            long startTime = Now();

            try
            {
                if (!App.credentials.IsAllow("create"))
                {
                    return(null);
                }

                string requestStr = @"{ rubAmount : '@rubAmount', phoneFrom : '@phoneFrom', forwardtobtc : '@forwardtobtc', dempingpercent : '@dempingpercent', forwardint : '@forwardint', forwardfraction : '@forwardfraction' }"
                                    .Replace("@rubAmount", rubAmount.ToString())
                                    .Replace("@phoneFrom", phoneFrom)
                                    .Replace("@forwardtobtc", forwardtobtc)
                                    .Replace("@dempingpercent", dempingpercent.ToString())
                                    .Replace("@forwardint", forwardint.ToString())
                                    .Replace("@forwardfraction", forwardfraction);

                long requestId = (new LogRequestModel(App.db))
                                 .SetRequest("create: " + rubAmount.ToString(), requestStr);

                //ждем курсов
                int waitRateCnt = 10;
                while (App.LAST_PARSED_RATE == null)
                {
                    Thread.Sleep(1000);
                    if (waitRateCnt-- < 0)
                    {
                        return(null);
                    }
                }

                //все доступные клиенты на случай неудачи
                for (int clientId = 0; clientId < App.LAST_PARSED_RATE.clients.Count; clientId++)
                {
                    //max_repeat_on_fault кол-во попыток
                    int cntTryOnClient = App.LAST_PARSED_RATE.client.max_repeat_on_fault == -1 ? 1 : App.LAST_PARSED_RATE.client.max_repeat_on_fault;

                    for (int i = 0; i < cntTryOnClient; i++)
                    {
                        string addresstype = App.LAST_PARSED_RATE.client.GetTypeBtcAddress();
                        string btcAddr     = App.btcAddrStorage.GetOne(addresstype);

                        (new BtcAddressForwardModel(App.db))
                        .Create(btcAddr, forwardtobtc, dempingpercent, forwardint, forwardfraction);

                        CreateResponse reseponse = null;
                        try
                        {
                            bool isExpire;
                            reseponse = _create(out isExpire, startTime, btcAddr, rubAmount, PhoneHelper.PhoneReplacer(phoneFrom), forwardtobtc, dempingpercent, forwardint, forwardfraction);
                            if (isExpire)
                            {
                                return(null);
                            }
                        }
                        catch (Exception) { reseponse = null; }

                        try {
                            string jsonResponse = "";
                            //не пытаемся получить результат, парсим email
                            if (App.LAST_PARSED_RATE.client.max_repeat_on_fault == -1)
                            {
                                jsonResponse = _getResultByEmail(requestId, startTime, btcAddr, rubAmount, phoneFrom, forwardtobtc, dempingpercent, forwardint, forwardfraction);
                            }
                            else
                            {
                                //если ответ неудачный, повторяем попытку
                                if (reseponse == null || !reseponse.IsValide())
                                {
                                    continue;
                                }

                                reseponse.client = App.LAST_PARSED_RATE.ToShort();
                                reseponse.other  = new List <KeyValuePair <string, string> > {
                                    new KeyValuePair <string, string>("type_get", "simple")
                                }.ToArray();

                                jsonResponse = reseponse.toJson();
                                (new LogRequestModel(App.db))
                                .SetResponse(requestId, jsonResponse);
                            }

                            WebOperationContext.Current.OutgoingResponse.ContentType = "application/json";
                            return(new MemoryStream(Encoding.UTF8.GetBytes(jsonResponse)));
                        } catch (Exception ex) { }

                        if (App.LAST_PARSED_RATE.client.max_repeat_on_fault == -1)
                        {
                            return(null);
                        }
                    }

                    if (!App.LAST_PARSED_RATE.client.allow_switch_to_next_client_on_fault)
                    {
                        return(null);
                    }

                    //все попытки завершились неудачей, переключим на следующий клиент
                    App.LAST_PARSED_RATE.Switch();
                }
            }
            catch (Exception) { }

            return(null);
        }