/// <see cref="ICobinhoodClient.PlaceOrder(string, string, OrderSide, OrderType, string, string)"/> public async Task <PlacedOrderInfo> PlaceOrder(string quoteSymbol, string baseSymbol, OrderSide orderSide, OrderType orderType, string size, string price = "") { if (string.IsNullOrWhiteSpace(quoteSymbol)) { throw new ArgumentException("QuoteSymbol cannot be empty. ", "quoteSymbol"); } if (string.IsNullOrWhiteSpace(baseSymbol)) { throw new ArgumentException("BaseSymbol cannot be empty. ", "baseSymbol"); } if (orderType != OrderType.Market && string.IsNullOrEmpty(price)) { throw new ArgumentException("Price cannot be empty. ", "price"); } if (string.IsNullOrWhiteSpace(size)) { throw new ArgumentException("Size cannot be empty. ", "size"); } var tradingPair = (quoteSymbol + "-" + baseSymbol).ToUpper(); var newOrder = new NewOrder() { trading_pair_id = tradingPair, side = orderSide.GetDescription(), type = orderType.GetDescription(), size = size, price = price, }; var result = await _apiClient.CallAsync <PlacedOrderInfo>(ApiMethod.POST, EndPoints.PlaceOrder, "", newOrder); return(result); }