private Holding ConvertHolding(Messages.Position position) { var holding = new Holding { Symbol = _symbolMapper.GetLeanSymbol(position.Symbol), AveragePrice = position.AveragePrice, Quantity = position.Amount, UnrealizedPnL = position.PL, CurrencySymbol = "$", Type = SecurityType.Crypto }; try { var tick = GetTick(holding.Symbol); holding.MarketPrice = tick.Value; } catch (Exception) { Log.Error($"BitfinexBrokerage.ConvertHolding(): failed to set {holding.Symbol} market price"); throw; } return(holding); }
private Holding ConvertHolding(Messages.Position position) { return(new Holding() { Symbol = _symbolMapper.GetLeanSymbol(position.Symbol), AveragePrice = position.AveragePrice, Quantity = position.Amount, UnrealizedPnL = position.PL, CurrencySymbol = "$", Type = SecurityType.Crypto }); }