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

Unable to use api key #31

Open
ghost opened this issue Nov 17, 2022 · 8 comments
Open

Unable to use api key #31

ghost opened this issue Nov 17, 2022 · 8 comments

Comments

@ghost
Copy link

ghost commented Nov 17, 2022

I am beginner at coding.

Should I store the api key in a json format file? containing the following statement : api_key = XXXXXXXXXXX (my api key)

AND
import nasdaqdatalink
nasdaqdatalink.read_key(filename="/path")

the path begins where my code is located or should I write the full path of the archive?

@clientsuccessnasdaq
Copy link

clientsuccessnasdaq commented Nov 17, 2022 via email

@clientsuccessnasdaq
Copy link

clientsuccessnasdaq commented Nov 18, 2022 via email

@morfeo630
Copy link

Hello to all,

I also have truble getting the data....
I have my https://data.nasdaq.com/ account and a subscription to QUOTEMEDIA/End of Day US Stock Prices.

I have truble getting the end of day data for the last month. Can you please help me, with my code to get the last 30 day data for IBM, please?

In my code below I replaced my API KEY with 'xxx'.
Thank you for your time and help.
Best regards,
Valter

My python code:

import nasdaqdatalink

if __name__ == '__main__':
    nasdaqdatalink.ApiConfig.api_key = "xxx"
    data = nasdaqdatalink.get('NSE/OIL')
    print(data)

The result:

               Open     High  ...  Total Trade Quantity  Turnover (Lacs)
Date                          ...                                       
2009-09-30  1096.00  1156.70  ...            19748012.0        223877.07
2009-10-01  1102.00  1173.70  ...             3074254.0         35463.78
2009-10-05  1152.00  1165.90  ...              919832.0         10581.13
2009-10-06  1149.80  1157.20  ...              627957.0          7185.90
2009-10-07  1153.80  1160.70  ...              698216.0          8032.98
...             ...      ...  ...                   ...              ...
2018-12-31   178.10   179.00  ...              761462.0          1343.75
2019-01-01   175.00   176.40  ...              381570.0           669.16
2019-01-02   175.80   176.20  ...              722532.0          1251.85
2019-01-03   172.80   175.70  ...              698190.0          1212.34
2019-01-04   172.05   174.95  ...              431122.0           749.99

[2299 rows x 7 columns]

Process finished with exit code 0

@clientsuccessnasdaq
Copy link

clientsuccessnasdaq commented Dec 28, 2022 via email

@clientsuccessnasdaq
Copy link

clientsuccessnasdaq commented Dec 28, 2022 via email

@morfeo630
Copy link

morfeo630 commented Dec 28, 2022 via email

@clientsuccessnasdaq
Copy link

clientsuccessnasdaq commented Dec 28, 2022 via email

@morfeo630
Copy link

Thank you Kim for your help.
Now I have my code working and getting the requested data. Howewer I have additional questions bat they are for other topic.

Thank you for your time and answers.
Best regards,
Valter

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