예제 #1
0
        public JsonResult ReadHistoricData(string tickers, DateTime fromDate, DateTime toDate)
        {
            var databaseCalls = new DatabaseCalls();
            var hd_Root       = ExternalApiCalls.CallExternalAPIForHistoricData(tickers, fromDate, toDate);
            var hd_Id         = databaseCalls.PostHistoricPagination(hd_Root.pagination);

            databaseCalls.PostHistoricData(hd_Root.data, hd_Id);
            return(Json(new { success = true }, JsonRequestBehavior.AllowGet));
        }
예제 #2
0
        public JsonResult ReadIntraData(string tickers)
        {
            var databaseCalls = new DatabaseCalls();
            var iDay_Root     = ExternalApiCalls.CallIntradayData(tickers);
            var iDay_Id       = databaseCalls.PostIntraDayPagination(iDay_Root.pagination);

            databaseCalls.PostIntraDayData(iDay_Root.data, iDay_Id);
            return(Json(new { success = true }, JsonRequestBehavior.AllowGet));
        }
예제 #3
0
        public JsonResult ReadEndOfTheDayData(string tickers)
        {
            var databaseCalls = new DatabaseCalls();
            var eod_Root      = ExternalApiCalls.CallExternalAPIForEndOfDayData(tickers);
            var eod_Id        = databaseCalls.PostEODPagination(eod_Root.pagination);

            databaseCalls.PostEODData(eod_Root.data, eod_Id);


            return(Json(new { success = true }, JsonRequestBehavior.AllowGet));
        }