static void Main(string[] _) { try { // Create the platform session. using (ISession session = Configuration.Sessions.GetSession()) { // Open the session session.Open(); // Retrieve Intraday Summaries with PT1M (1-minute interval). Specify to capture only 5 rows. var response = Summaries.Definition("VOD.L").Interval(Summaries.Interval.PT1M) .Fields("DATE_TIME", "OPEN_BID", "OPEN_ASK", "BID", "ASK", "BID_LOW_1", "ASK_LOW_1", "BID_HIGH_1", "ASK_HIGH_1") .Count(2) .GetData(); Common.DisplayTable(response, "Historical Intraday Summaries"); Console.Write("Enter to continue: "); Console.ReadLine(); // Retrieve Interday Summaries with P1D (1-day interval). response = Summaries.Definition("VOD.L").Interval(Summaries.Interval.P1D) .Fields("DATE", "TRDPRC_1", "MKT_OPEN", "VWAP", "LOW_1", "HIGH_1") .GetData(); Common.DisplayTable(response, "Historical Interday Summaries"); Console.Write("Enter to exit. "); Console.ReadLine(); } } catch (Exception e) { Console.WriteLine($"\n**************\nFailed to execute: {e.Message}\n{e.InnerException}\n***************"); } }
static void Main(string[] _) { try { // Create the platform session. using ISession session = Sessions.GetSession(); // Open the session session.Open(); // Retrieve Intraday Summaries with PT1M (5-minute interval). Specify to capture only 2 rows. var response = Summaries.Definition("VOD.L").Interval(Summaries.Interval.PT5M) .Fields("DATE_TIME", "OPEN_BID", "OPEN_ASK", "BID", "ASK", "BID_LOW_1", "ASK_LOW_1", "BID_HIGH_1", "ASK_HIGH_1") .Count(2) .GetData(); Common.DisplayTable("Historical Intraday Summaries", response); // Retrieve Interday Summaries with P1D (1-day interval). response = Summaries.Definition("VOD.L").Interval(Summaries.Interval.P1D) .Fields("DATE", "TRDPRC_1", "MKT_OPEN", "VWAP", "LOW_1", "HIGH_1") .GetData(); Common.DisplayTable("Historical Interday Summaries", response); // Retrieve interday summaries for a list of instruments response = Summaries.Definition().Universe("IBM.N", "AAPL.O", "EUR=") .Fields("DATE", "TRDPRC_1", "BID", "ASK", "NAVALUE", "MID_PRICE") .GetData(); Common.DisplayTable("Historical Interday Summaries for a list of instruments", response); } catch (Exception e) { Console.WriteLine($"\n**************\nFailed to execute: {e.Message}\n{e.InnerException}\n***************"); } }
static void Main(string[] _) { try { // Create the platform session. using ISession session = Sessions.GetSession(); // Open the session session.Open(); // Daily summaries for the last 30 days. Start and end dates must be UTC formatted // Note: The days reported only include trading days. var last_30_days = DateTime.UtcNow.AddDays(-30); Console.WriteLine($"Date: {last_30_days}"); var response = Summaries.Definition("VOD.L").Interval(Summaries.Interval.P1D) .Fields("TRDPRC_1", "LOW_1", "HIGH_1") .Start(last_30_days) .End(DateTime.UtcNow) .GetData(); Common.DisplayTable("Historical daily Summaries - last 30 trading days", response); // Monthly summaries for last calendar year. var lastYear = DateTime.Now.Year - 1; var start = new DateTime(lastYear, 1, 1, 0, 0, 0, DateTimeKind.Utc); var end = new DateTime(lastYear, 12, 31, 0, 0, 0, DateTimeKind.Utc); response = Summaries.Definition("VOD.L").Interval(Summaries.Interval.P1M) .Fields("TRDPRC_1", "LOW_1", "HIGH_1") .Start(start) .End(end) .GetData(); Common.DisplayTable("Historical monthly Summaries - last calendar year", response); } catch (Exception e) { Console.WriteLine($"\n**************\nFailed to execute: {e.Message}\n{e.InnerException}\n***************"); } }