From 4621731b26351c47c34b7f1cd849d85dfec4c202 Mon Sep 17 00:00:00 2001 From: calvin Date: Thu, 13 Jan 2022 10:12:40 -0500 Subject: [PATCH] revert and handle non list string iterables --- alpaca_trade_api/rest.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/alpaca_trade_api/rest.py b/alpaca_trade_api/rest.py index 27a57326..ffd487c8 100644 --- a/alpaca_trade_api/rest.py +++ b/alpaca_trade_api/rest.py @@ -636,7 +636,7 @@ def _data_get(self, path += f'/{symbol_or_symbols}' if endpoint: path += f'/{endpoint}' - if isinstance(symbol_or_symbols, list) and symbol_or_symbols: + if not isinstance(symbol_or_symbols, str): data['symbols'] = ','.join(symbol_or_symbols) resp = self.data_get(path, data=data, api_version=api_version) if not resp_grouped_by_symbol: @@ -914,7 +914,6 @@ def get_news_iter(self, include_content: bool = False, exclude_contentless: bool = False, raw=False) -> NewsIterator: - symbol = symbol or [] # Avoid passing symbol as path param if isinstance(symbol, str): symbol = [symbol]