def fetch_by_code(to_date: str = date_utils.get_current_dt()): session: Session = db_client.get_session() basic_list = session.query(TsBasic).all() session.close() for basic in basic_list: # type: TsBasic ts_code = basic.ts_code from_date = fetch_from_date(ts_code) fetch.common_fetch(TsDailyTradeInfo, 'fetch_daily_bar', ts_code=ts_code, from_date=from_date, to_date=to_date)
def fetch_by_date(to_date: str = date_utils.get_current_dt()): from_date = fetch_from_date() return fetch.common_fetch(TsDailyBasic, 'fetch_daily_basic', from_date=from_date, to_date=to_date)
def fetch_by_date(to_date: str = date_utils.get_current_dt()): from_date = fetch_from_date() return fetch.common_fetch(TsAdjFactor, 'fetch_adj_factor', from_date=from_date, to_date=to_date)
def fetch_by_date(to_date: str = date_utils.get_current_dt()): from_date = fetch_from_date() return fetch.common_fetch(TsStkLimit, 'fetch_stk_limit', from_date=from_date, to_date=to_date)