// TODO: change iceberg orders to require TOTAL amount (and split that amount based on repeatCount) // ICEBERG: Join the inside bid/offer public static void GdaxIcebergJoinInside(ExchangeGdaxAPI api, string symbol, OrderSide side, decimal amount, int repeatCount) { decimal amountPer = amount / repeatCount; int count = 0; while (count < repeatCount) { // Submit new order var or = GdaxJoinInside(api, symbol, side, amountPer); Console.WriteLine(or.ToStr()); var eor = api.GetOrderDetails(or.OrderId); // Wait for fill while (eor.AmountFilled < eor.Amount) { Thread.Sleep(1000); eor = api.GetOrderDetails(or.OrderId); } count++; } }
// ICEBERG: Join the inside bid/offer public static void GdaxIcebergJoinInside(ExchangeGdaxAPI api, string symbol, OrderSide side, decimal amount, int repeatCount, TimeSpan delayBetweenTrades) { decimal amountPer = amount / repeatCount; int count = 0; while (count < repeatCount) { // Submit new order var or = GdaxJoinInside(api, symbol, side, amountPer); Console.WriteLine("{0}/{1}: {2}", count, repeatCount, or.ToStr()); var eor = api.GetOrderDetails(or.OrderId); count++; Thread.Sleep((int)delayBetweenTrades.TotalMilliseconds); } }