Пример #1
0
        public string PlaceQuotedMarketOrder(string action, decimal quote_amount, string asset, string currency)
        {
            var data = new PlaceOrderRequest()
            {
                action       = action,
                quote_amount = quote_amount,
                asset        = asset,
                currency     = currency,
                type         = "market"
            };
            var result = Call("POST", "/v1/order/new", JsonConvert.SerializeObject(data), true);
            var obj    = JsonConvert.DeserializeObject <PlaceOrderResponse>(result);

            return(obj.id);
        }
Пример #2
0
        public string PlaceStopLossMarketOrder(string action, decimal amount, string asset, string currency, decimal price, decimal stop_price)
        {
            var data = new PlaceOrderRequest()
            {
                action     = action,
                amount     = amount,
                asset      = asset,
                currency   = currency,
                price      = price,
                type       = "stop-loss-market",
                stop_price = stop_price
            };
            var result = Call("POST", "/v1/order/new", JsonConvert.SerializeObject(data), true);
            var obj    = JsonConvert.DeserializeObject <PlaceOrderResponse>(result);

            return(obj.id);
        }
Пример #3
0
        public string PlaceLimitOrder(string action, decimal amount, string asset, string currency, decimal price, string[] options)
        {
            var data = new PlaceOrderRequest()
            {
                action   = action,
                amount   = amount,
                asset    = asset,
                currency = currency,
                price    = price,
                type     = "limit",
                options  = options
            };
            var result = Call("POST", "/v1/order/new", JsonConvert.SerializeObject(data), true);
            var obj    = JsonConvert.DeserializeObject <PlaceOrderResponse>(result);

            return(obj.id);
        }