public static List<OpenInterestSummary> GetAccountSummary() { List<OpenInterestSummary> openInterestSummarys = new List<OpenInterestSummary>(); string xmlPath = GetCommandXmlPath("AccountSummary"); XmlDocument doc = new XmlDocument(); doc.Load(xmlPath); XmlNodeList XmlNodeList = doc.ChildNodes[1].ChildNodes; foreach (XmlNode summaryNode in XmlNodeList) { OpenInterestSummary summaryItem = new OpenInterestSummary(); summaryItem.UpdateByXmlRowAttribute(summaryNode); openInterestSummarys.Add(summaryItem); } int i = 1; foreach (OpenInterestSummary item in openInterestSummarys) { Tuple<string,Guid, string> group = ExchangeData.GetAccountGroup("WF01", item.Id); //Just test item.GroupId = Guid.NewGuid(); item.GroupCode = "Demo"; item.Code = "Account00" + i; i++; } return openInterestSummarys; }
public static List<OpenInterestSummary> GetInstrumentSummary() { List<OpenInterestSummary> openInterestSummarys = new List<OpenInterestSummary>(); string xmlPath = GetCommandXmlPath("InstrumentSummary"); XmlDocument doc = new XmlDocument(); doc.Load(xmlPath); XmlNodeList XmlNodeList = doc.ChildNodes[1].ChildNodes; foreach (XmlNode instrumentNode in XmlNodeList) { OpenInterestSummary instrumentSummary = new OpenInterestSummary(); instrumentSummary.UpdateByXmlRowAttribute(instrumentNode); openInterestSummarys.Add(instrumentSummary); } return openInterestSummarys; }