Skip to content

Unable to use api key #31

Open
Open

Description

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?

Activity

  1. clientsuccessnasdaq commented on Nov 17, 2022

    @clientsuccessnasdaq
  2. clientsuccessnasdaq commented on Nov 18, 2022

    @clientsuccessnasdaq
  3. morfeo630 commented on Dec 28, 2022

    @morfeo630

    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
  4. clientsuccessnasdaq commented on Dec 28, 2022

    @clientsuccessnasdaq
  5. clientsuccessnasdaq commented on Dec 28, 2022

    @clientsuccessnasdaq
  6. morfeo630 commented on Dec 28, 2022

    @morfeo630
  7. clientsuccessnasdaq commented on Dec 28, 2022

    @clientsuccessnasdaq
  8. morfeo630 commented on Dec 30, 2022

    @morfeo630

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions