I used this command to pull down all ETF listings in NYSE:
from quantrocket.master import collect_listings
collect_listings(exchanges="NYSE", sec_types="ETF")
I could see from the log window that "SPY" and "QQQ" as well as many other ETF"s were downloaded. Is there some special text that should print out when this is "done"?
Then I ran this:
from quantrocket.master import download_master_file
download_master_file(
"tickers2.csv",
exchanges="NYSE",
sec_types="ETF",
symbols=[
"SPY",
"QQQ",]
)
Then I get the error below. If I use "AAPL" or other individual stocks, it will work. I tried "STK" as sec_types field but still same error. Any idea what may be the issue? Or is it a case of collect_listings needing more time?
/opt/conda/lib/python3.6/site-packages/requests/models.py in raise_for_status(self)
933
934 if http_error_msg:
--> 935 raise HTTPError(http_error_msg, response=self)
936
937 def close(self):
HTTPError: ('400 Client Error: BAD REQUEST for url: http://houston/master/securities.csv?exchanges=NYSE&sec_types=ETF&symbols=SPY&symbols=QQQ', {'status': 'error', 'msg': 'No securities match the query parameters'})