From 8c7a89e5d382b0b0357a8c12a6bf9fa8c265ecc8 Mon Sep 17 00:00:00 2001 From: Diego Boca Date: Wed, 21 Apr 2021 23:38:51 +0200 Subject: [PATCH] Remove DisplayQty from CreateSimpleLimit --- .../Models/Partials/OrderPOSTRequestParams.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Bitmex.NET/Models/Partials/OrderPOSTRequestParams.cs b/Bitmex.NET/Models/Partials/OrderPOSTRequestParams.cs index 366d837..efa2ae4 100644 --- a/Bitmex.NET/Models/Partials/OrderPOSTRequestParams.cs +++ b/Bitmex.NET/Models/Partials/OrderPOSTRequestParams.cs @@ -41,8 +41,24 @@ public static OrderPOSTRequestParams CreateSimpleLimit(string symbol, decimal qu Side = Enum.GetName(typeof(OrderSide), side), OrderQty = quantity, OrdType = Enum.GetName(typeof(OrderType), OrderType.Limit), - DisplayQty = quantity, Price = price, + // only iceberg order must have the displayQty declared + // DisplayQty = displayQty, + ExecInst = "ParticipateDoNotInitiate", + }; + } + + public static OrderPOSTRequestParams CreateSimpleLimitIceberg(string symbol, decimal quantity, decimal displayQty, decimal price, OrderSide side) + { + return new OrderPOSTRequestParams + { + Symbol = symbol, + Side = Enum.GetName(typeof(OrderSide), side), + OrderQty = quantity, + OrdType = Enum.GetName(typeof(OrderType), OrderType.Limit), + Price = price, + // only iceberg order must have the displayQty declared + DisplayQty = displayQty, ExecInst = "ParticipateDoNotInitiate", }; }