private static OrderExecutionStatus ConvertExecutionStatus(Order order)
 {
     if (order.IsCancelled)
     {
         return(OrderExecutionStatus.Cancelled);
     }
     if (order.IsLive)
     {
         return(OrderExecutionStatus.New);
     }
     return(OrderExecutionStatus.Fill);
 }
        private ExecutionReport OrderToTrade(Order order)
        {
            var id         = order.Id;
            var execTime   = order.Timestamp;
            var execPrice  = order.Price;
            var execVolume = order.ExecutedAmount;
            var tradeType  = BitfinexModelConverter.ConvertTradeType(order.Side);
            var status     = ConvertExecutionStatus(order);
            var instr      = _modelConverter.ExchangeSymbolToLykkeInstrument(order.Symbol);

            return(new ExecutionReport(instr, execTime, execPrice, execVolume, tradeType, id, status)
            {
                ExecType = ExecType.Trade,
                Success = true,
                FailureType = OrderStatusUpdateFailureType.None
            });
        }