Description
Python 3.12 and nasdaqdatalink 1.0.4 used in a Jupyter Notebook.
My API key works fine when I enter a URL in my web-browser like this https://data.nasdaq.com/api/v3/datatables/SHARADAR/SF1?ticker=MSFT&api_key=MY-API-KEY
But there seems to be several bugs when setting the API-key using the Python API and then calling the function export_table()
:
-
Using
read_key()
makes the first call toexport_table()
work, but following calls give this error:AuthenticationError: (Status 400) (Nasdaq Data Link Error QEAx01) We could not recognize your API key. Please check your API key and try again.
-
Setting the API-key using
os.environ['NASDAQ_DATA_LINK_API_KEY'] = 'MY-API-KEY'
worked the other day but not anymore and I get the following error:ForbiddenError: (Status 403) (Nasdaq Data Link Error QEPx04) A valid API key is required to retrieve data. Please check your API key and try again. You can find your API key under your account settings.
The only solution that seems to be working properly is to pass the API-key directly to the function export_table()
Please fix this problem. Thanks.
PS: It is very annoying that you have auto-response spamming the message-threads here. It makes it hard to read the actual discussions.