/// <summary> /// Returns a list of all stocks currently owned /// </summary> /// <returns>A list of owned stocks</returns> public Dictionary <string, decimal> GetPositions() { IList <Position> positionsResults = Client.DownloadPositions(getAccount().PositionsUrl.ToString()); /* Build the return value */ Dictionary <string, decimal> positions = new Dictionary <string, decimal>(); foreach (Position p in positionsResults) { if (p.Quantity != 0) { positions.Add(Instruments.GetSymbol(p.InstrumentUrl.ToString(), positionsResults), p.Quantity); } } return(positions); }