Esempio n. 1
0
        public async Task RemoveValidityAsync(string orderId, [FromBody] DeleteValidityRequest request)
        {
            if (!_ordersCache.TryGetOrderById(orderId, out var order))
            {
                throw new InvalidOperationException("Order not found");
            }

            ValidationHelper.ValidateAccountId(order, request.AccountId);

            var originator = GetOriginator(request.Originator);

            await _tradingEngine.RemoveOrderValidityAsync(order.Id, originator,
                                                          request.AdditionalInfo);

            _operationsLogService.AddLog("action order.changeLimits", order.AccountId,
                                         new { orderId = orderId, request = request.ToJson() }.ToJson(), "");
        }