示例#1
0
        public async void TestGetAll_ASX300()
        {
            StockBLL bll    = new StockBLL(tableName);
            var      result = await bll.GetAll();

            Console.WriteLine(ObjectHelper.ToJson(result));
        }
示例#2
0
        public async void TestMigrateExistingTickersToDb()
        {
            string      tempTickerFolder = "/tmp/screen3_temp_files/localticker/";
            string      tableName        = "stevenjiangnz-screen3-tickers";
            TickerBLL   bll             = new TickerBLL(this.s3_bucket_name, tempTickerFolder);
            TickerDbBLL dbBll           = new TickerDbBLL(tableName);
            string      stock_tableName = "stevenjiangnz-screen3-asx300";

            StockBLL stockbll  = new StockBLL(stock_tableName);
            var      stockList = await stockbll.GetAll();

            Console.WriteLine("stocklist: " + ObjectHelper.ToJson(stockList.Count));

            foreach (var stock in stockList)
            {
                var tickerList = await bll.GetDailyTickerEntityList(stock.Code);

                await dbBll.AppendTickerRange(tickerList);

                Console.WriteLine($"updated ticker count: {tickerList.Count}, {stock.Code}");
            }
        }