using System.Collections.Generic; using System.Linq; namespace BrokerInterfaceETradeServer.Models { public class BrokerAccount { public string account_identifier { get; set; } public string account_name { get; set; } public string account_key { get; set; } public string account_type { get; set; } public string account_status { get; set; } public string account_description { get; set; } public string account_mode { get; set; } public string quote_mode { get; set; } public string day_trader_status { get; set; } public string nickname { get; set; } public double account_value { get; set; } public double buying_power { get; set; } public double buying_power_in_use { get; set; } public double available_funds { get; set; } public double realized_profit_loss { get; set; } public double unrealized_profit_loss { get; set; } public bool linked { get; set; } public List Positions { get; set; } public List Orders { get; set; } public int ManagedOrderCount() { return Orders.Where(o => o.IsLocal).Count(); } } }