22 using System.Collections.Generic;
39 private readonly DateTime _stopMarketOrderSupportEndDate =
new DateTime(2019, 3, 23, 1, 0, 0);
49 private readonly HashSet<OrderType> _supportedOrderTypes =
new()
118 if (order ==
null || security ==
null || request ==
null)
120 var parameter = order ==
null ? nameof(order) : nameof(security);
121 throw new ArgumentNullException(parameter, $
"{parameter} parameter cannot be null. Please provide a valid {parameter} for submission.");
127 $
"Order with type {order.Type} can't be modified, only LIMIT.");
134 $
"Order's parameter 'TimeInForce' is not instance of Good Til Cancelled class.");
141 $
"Order with status {order.Status} can't be modified");
165 if(order ==
null || security ==
null)
167 var parameter = order ==
null ? nameof(order) : nameof(security);
168 throw new ArgumentNullException(parameter, $
"{parameter} parameter cannot be null. Please provide a valid {parameter} for submission.");
189 if (!_supportedOrderTypes.Contains(order.
Type))
196 if (order.
Type ==
OrderType.StopMarket && order.
Time >= _stopMarketOrderSupportEndDate)
211 return base.CanSubmitOrder(security, order, out message);
234 #pragma warning disable CA1062
237 #pragma warning restore CA1062
251 return map.ToReadOnlyDictionary();