コード例 #1
0
        NewStopOffer SendAddNewStopOfferRequest(string url, NewStopOfferRequest body)
        {
            RestClient rc = new RestClient(config.ApiTradingStopUrl + "offer/" + url);

            rc.AddOwnHeaderToRequest(new AutorizeData(config));
            rc.SendPOST(body);

            return(Tools.TryGetResponse <NewStopOffer>(rc));
        }
コード例 #2
0
        /// <summary>
        /// Add new stop offer to user account. For use, must authorize User.
        /// </summary>
        /// <param name="currencyPair">Currency pair code.</param>
        /// <param name="body">New offer body.</param>
        /// <returns>Offer UUID identificator.</returns>
        public string AddNewStopOffer(string currencyPair, NewStopOfferRequest body)
        {
            if (body == null)
            {
                throw new ArgumentException("The body params can not be null!");
            }

            return(SendAddNewStopOfferRequest(currencyPair, body).StopOfferId);
        }
コード例 #3
0
        void AddNewStopOffer()
        {
            NewStopOfferRequest body = new NewStopOfferRequest();

            body.SetStopLimitOffer("BUY", amount, stopRate, rate);

            try
            {
                offerId = bbClient.PrivateStopTrading.AddNewStopOffer("BTC-PLN", body);
            }
            catch (FailResponseException e)
            {
                Tools.HandlingErrors(e);
                return;
            }
        }