Hello -- I've been paying for the Sharadar datasets from Nasdaq for a few years now, mostly working with it in R with custom code.
I've downloaded Quantrocket and am blown away by its features! However, I am not having success connecting to Sharadar with my current API key, which has up til now worked with everything I've used it for.
I start with:
from quantrocket.license import set_quandl_key
set_quandl_key(api_key='XXX')
which returns {'status': 'successfully set Quandl API key'}
From there I try to download the fundamentals:
from quantrocket.fundamental import collect_sharadar_fundamentals
collect_sharadar_fundamentals(country='US')
This returns a traceback, seems to be something wrong with connection to Houston? But the final error references permissions:
HTTPError: ('403 Client Error: FORBIDDEN for url: http://houston/fundamental/sharadar/fundamentals?country=US', {'status': 'error', 'error': 'no active software subscription found, can only collect the FREE country'})
Any idea why my API key is not being detected? Thank you !
Full traceback:
---------------------------------------------------------------------------
HTTPError Traceback (most recent call last)
Input In [8], in <cell line: 2>()
1 from quantrocket.fundamental import collect_sharadar_fundamentals
----> 2 collect_sharadar_fundamentals(country='US')
File /opt/conda/lib/python3.9/site-packages/quantrocket/fundamental.py:1669, in collect_sharadar_fundamentals(country)
1667 params["country"] = country
1668 response = houston.post("/fundamental/sharadar/fundamentals", params=params)
-> 1669 houston.raise_for_status_with_json(response)
1670 return response.json()
File /opt/conda/lib/python3.9/site-packages/quantrocket/houston.py:212, in Houston.raise_for_status_with_json(response)
210 e.json_response = {}
211 e.args = e.args + ("please check the logs for more details",)
--> 212 raise e
File /opt/conda/lib/python3.9/site-packages/quantrocket/houston.py:204, in Houston.raise_for_status_with_json(response)
199 """
200 Raises 400/500 error codes, attaching a json response to the
201 exception, if possible.
202 """
203 try:
--> 204 response.raise_for_status()
205 except requests.exceptions.HTTPError as e:
206 try:
File /opt/conda/lib/python3.9/site-packages/requests/models.py:960, in Response.raise_for_status(self)
957 http_error_msg = u'%s Server Error: %s for url: %s' % (self.status_code, reason, self.url)
959 if http_error_msg:
--> 960 raise HTTPError(http_error_msg, response=self)
HTTPError: ('403 Client Error: FORBIDDEN for url: http://houston/fundamental/sharadar/fundamentals?country=US', {'status': 'error', 'error': 'no active software subscription found, can only collect the FREE country'})