diff --git a/vnpy_tushare/tushare_datafeed.py b/vnpy_tushare/tushare_datafeed.py index 1e413ba..21e029c 100644 --- a/vnpy_tushare/tushare_datafeed.py +++ b/vnpy_tushare/tushare_datafeed.py @@ -143,7 +143,12 @@ def query_bar_history(self, req: HistoryRequest) -> Optional[List[BarData]]: end = req.end.strftime("%Y%m%d") ts_symbol = to_ts_symbol(symbol, exchange) + if not ts_symbol: + return None + asset = to_ts_asset(symbol, exchange) + if not asset: + return None ts_interval = INTERVAL_VT2TS.get(interval) if not ts_interval: