QuantRocket

"No securities match the query parameters"


#1

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'})

#2

The primary listing exchange for SPY and QQQ is ARCA and NASDAQ respectively, so they won’t be included with NYSE listings.

More info on collecting listings including status messages to look for to indicate completion is available in the usage guide.


#3

@brian

I was a little confused by the limitation of SPY, QQQ, AAPL, and NFLX. Those are all tickers that I have paid a subscription for through IB, and they show up in the logs whenever I collect listings.

Why wouldn’t that data flow through to Quant Rocket’s interface? Is Quant Rocket somehow limiting access to the NYSE data I’ve paid for?

Thanks,
Ernie


#4

Here’s an example for BAC when I try to pull data…

quantrocket_flightlog_1|2019-06-03 15:39:24 quantrocket.history: WARNING [nyse-2-1min] IB reports no market data subscription for BAC STK (conid 10098), please enable subscription in IB Account Management for the username associated with ibg1, see http://qrok.it/h/err/162/md for morehelp (error code 162: Historical Market Data Service error message:No market data permissions for NYSE STK)
quantrocket_houston_1|172.18.0.3 - - [03/Jun/2019:15:39:24 +0000] “POST /flightlog/handler HTTP/1.1” 200 5 “-” “-”
quantrocket_history_1|Issuing to ibg1 historical data request for 1 W of 1 min TRADES for BAC STK (conid 10098) ending 20170612 15:40:00 GMT
quantrocket_flightlog_1|2019-06-03 15:39:24 quantrocket.history: WARNING ibg1 client 3041 got IB error code 354: Requested market data is not subscribed.


#5

Actually I contacted IB and had the wrong subscription. I chose the $10/month bundle which didn’t have what I needed. Turns out the $1.50/month NYSE subscription is all I needed for NYSE-only. Sorry for the confusion on my end. Thanks again.