/// <summary> /// Add security. /// </summary> /// <param name="portfolio">Portfolio.</param> public void Add(Portfolio portfolio) { if (portfolio is null) { throw new ArgumentNullException(nameof(portfolio)); } _inner.Add(portfolio.Name, portfolio); NewPortfolio?.Invoke(portfolio); }
public void GetPortfolios() { string endPoint = "payment/balances"; var res = SendQuery(true, endPoint, _pubKey, _secKey); List <Balance> balances = JsonConvert.DeserializeAnonymousType(res, new List <Balance>()); BalanceInfo balanceInfo = new BalanceInfo(); balanceInfo.Balances = balances; balanceInfo.Name = _portfolioName; NewPortfolio?.Invoke(balanceInfo); }
private void RaiseNewPortfolio(Portfolio portfolio) { NewPortfolio?.Invoke(portfolio); NewPortfolios?.Invoke(new[] { portfolio }); }