/// <summary>
        /// Place a Market order
        /// </summary>
        /// <param name="pair">Trading pair</param>
        /// <param name="side">Trade side</param>
        /// <param name="quantity">Order quantity</param>
        /// <returns>OrderResponse object</returns>
        public static async Task <OrderResponse> MarketOrder(this ITradeOgre service, string pair, Side side, decimal quantity)
        {
            var ticker = await service.GetTicker(pair);

            var order = await service.PlaceOrder(pair, side, ticker.Price, quantity);

            return(order);
        }
Beispiel #2
0
        public void PlaceOrder_Test()
        {
            var pair     = "BTC-LTC";
            var side     = Side.Sell;
            var price    = 0.050M;
            var quantity = 10.0M;
            var order    = _service.PlaceOrder(pair, side, price, quantity).Result;

            Assert.NotNull(order);
        }
        /// <summary>
        /// Place a Limit order
        /// </summary>
        /// <param name="pair">Trading pair</param>
        /// <param name="side">Trade side</param>
        /// <param name="price">Order price</param>
        /// <param name="quantity">Order quantity</param>
        /// <returns>OrderResponse object</returns>
        public static async Task <OrderResponse> LimitOrder(this ITradeOgre service, string pair, Side side, decimal price, decimal quantity)
        {
            var order = await service.PlaceOrder(pair, side, price, quantity);

            return(order);
        }