Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugs when setting API-key #51

Open
Hvass-Labs opened this issue Jan 28, 2025 · 2 comments
Open

Bugs when setting API-key #51

Hvass-Labs opened this issue Jan 28, 2025 · 2 comments

Comments

@Hvass-Labs
Copy link

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():

  1. Using read_key() makes the first call to export_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.

  2. 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.

@clientsuccessnasdaq
Copy link

clientsuccessnasdaq commented Jan 28, 2025 via email

@clientsuccessnasdaq
Copy link

clientsuccessnasdaq commented Jan 29, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants