public static ApiRequestBuilder <Order> PostMarketOrder(this GdaxApiClient api, MarketOrderRequest order) { return(api.Post <Order>("orders") .Content( new { type = "market", side = order.Side.ToString().ToLower(), product_id = order.ProductId, funds = order.Funds?.ToString(CultureInfo.InvariantCulture), size = order.Size?.ToString(CultureInfo.InvariantCulture), })); }
public static ApiRequestBuilder <Order> PostLimitOrder(this GdaxApiClient api, LimitOrderRequest order) { return(api.Post <Order>("orders") .Content( new { type = "limit", side = order.Side.ToString().ToLower(), product_id = order.ProductId, price = order.Price.ToString(CultureInfo.InvariantCulture), size = order.Size.ToString(CultureInfo.InvariantCulture), })); }