Code Monkey home page Code Monkey logo

data-link-python's People

Contributors

couture-ql avatar dimitryzub avatar ericvautour-quandl avatar runawaycoast avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

data-link-python's Issues

Unable to use api key

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?

Can I get market prices through this API?

Hello, I hope this message finds you well. I would like to retrieve historical data for Brent Oil, API2 Carbon and Henry Hub gas, also the Exchange rates for dollar, euro and Yuan. I've been trying to read the docs and the tables but it has been difficult for me to find if I can retrieve this information from this API. Could you help me with the table that can fit my request? If it exists... Thank you in advance

Timeout for hung requests

Sometimes when downloading a lot of data from NasdaqDataLink, I get a hung connection during the ssl handshake. The requests library, which is being used to make requests, can take a timeout parameter, but this is not exposed through the API as far as I can tell.

What's the best way to retry after a timeout?

I noticed that the ApiConfig and Connection have retry parameters, but it still appears to be hanging.

DataLinkError: (Status 403) - Cant load data from API

Hi, i am having this issue when i try to load the API table. How can I solve this?


DataLinkError: (Status 403) Something went wrong. Please try again. If you continue to have problems, please contact us at [email protected].


Code:

import nasdaqdatalink

nasdaq_api_key ='my-key'
nasdaqdatalink.read_key(nasdaq_api_key)

df = nasdaqdatalink.get_table('MER/F1', paginate=True)
df

adj_* data information required

Hello to all,
I have some questions regarding the adjusted data.

  1. I understand that the data can vary from broker to broker for a little bit but why nasdaq have in the same row the "regular" data (open, high, low, close) and the adjusted data (adj_open, adj_high, adj_low, adj_close)?
  2. Why the adj_* data exists in first place and how is calculated?
  3. Why for the date before and included 2022-11-08 the adj_* data is so different from the "regular" data?
  4. What data is best to use for further calculation and data manipulation?

Folowing is the data:

     ticker       date    open    high     low   close     volume  dividend  split    adj_open    adj_high     adj_low   adj_close  adj_volume
0       IBM 2022-11-14  142.63  146.08  142.18  144.20  5293453.0      0.00    1.0  142.630000  146.080000  142.180000  144.200000   5293453.0
1       IBM 2022-11-11  141.50  144.13  140.96  143.17  5869298.0      0.00    1.0  141.500000  144.130000  140.960000  143.170000   5869298.0
2       IBM 2022-11-10  140.26  141.37  138.29  141.23  5386540.0      0.00    1.0  140.260000  141.370000  138.290000  141.230000   5386540.0
3       IBM 2022-11-09  137.95  138.90  136.94  137.39  4718328.0      1.65    1.0  137.950000  138.900000  136.940000  137.390000   4718328.0
4       IBM 2022-11-08  139.00  140.93  138.72  140.04  5039458.0      0.00    1.0  137.350475  139.257571  137.073797  138.378133   5039458.0
5       IBM 2022-11-07  136.64  138.70  136.51  138.34  4042576.0      0.00    1.0  135.018481  137.054035  134.890024  136.698307   4042576.0
6       IBM 2022-11-04  135.65  137.73  134.94  136.96  4176645.0      0.00    1.0  134.040229  136.095546  133.338655  135.334684   4176645.0
7       IBM 2022-11-03  136.42  136.48  133.97  134.47  4441075.0      0.00    1.0  134.801092  134.860380  132.380166  132.874233   4441075.0
8       IBM 2022-11-02  137.75  140.17  136.80  136.83  5360222.0      0.00    1.0  136.115309  138.506590  135.176582  135.206226   5360222.0
9       IBM 2022-11-01  138.25  138.65  136.70  138.20  3574815.0      0.00    1.0  136.609375  137.004628  135.077769  136.559968   3574815.0

The upper data was received using:

    data = nasdaqdatalink.get_table('QUOTEMEDIA/PRICES', ticker='IBM',
                                    date={'gte': '2022-11-01', 'lte': '2022-11-14'}, paginate=True)
    print(data)

Thank you in advance for your time and answers and helping me understanding and getting a dipper knowledge of the market data.
Best regards,
Valter

How to get available dataset name list?

In the example, need to set dataset name like below.

import nasdaqdatalink
data = nasdaqdatalink.get('NSE/OIL')

'NSE/OIL' seems like a dataset name.
So where is the list of available dataset names?

types of network protocols

Hi there,

just a simple question.

Which kind of network protocol are compatible with Nasdaq for messages and order management?
I've found out FIX protocol (used for messages between brokers, investment banks financial advisors etc.) but i would like to know if there are alternatives (maybe own by Nasdaq)

Thanks

Whitespace characters in ApiConfig.api_key cause runtime-errors

When setting ApiConfig.api_key the client does not try hard enough to remove whitespace before setting up the x-api-token http header.

Users that set an apikey in ~/.nasdaq/data_link_apikey tend to copy / paste their API key from their user profile.

It's also possible the environment variable suffers from the same problem. Since ApiConfig is treated as a global variable, and does not .strip() on set, users run into run-time errors.

While pr #11 attempts to fix one use-case for reading from a file, it is possible to run into the same issue using environment variables.

Ensure both use-case strip whitespace before setting the ApiConfig property.

No prices for currencies change since 29/11/22

Hello,
Since the 29 November we don't have any values from your api for everything related to the currencies change.

For example nasdaqdatalink.get("ECB/EURGBP", start_date="2022-12-05", api_key=...)
does not return anything.

Can you enlighten me on the subject ?

Regards,

Does the free user can only get 28 companies for SP500 index?

Does the free user can only get 28 companies for SP500 index?

sp500com = nasdaqdatalink.get_table('SHARADAR/SP500', action='current')
sp500com
           date   action ticker  ... contraticker contraname  note
None                             ...                              
0    2023-01-20  current    XOM  ...          N/A        N/A  None
1    2023-01-20  current    WMT  ...          N/A        N/A  None
2    2023-01-20  current     VZ  ...          N/A        N/A  None
3    2023-01-20  current    UNH  ...          N/A        N/A  None
4    2023-01-20  current   TSLA  ...          N/A        N/A  None
5    2023-01-20  current    TRV  ...          N/A        N/A  None
6    2023-01-20  current     PG  ...          N/A        N/A  None
7    2023-01-20  current    PFE  ...          N/A        N/A  None
8    2023-01-20  current    NKE  ...          N/A        N/A  None
9    2023-01-20  current   MSFT  ...          N/A        N/A  None
10   2023-01-20  current    MRK  ...          N/A        N/A  None
11   2023-01-20  current    MMM  ...          N/A        N/A  None
12   2023-01-20  current    MCD  ...          N/A        N/A  None
13   2023-01-20  current     KO  ...          N/A        N/A  None
14   2023-01-20  current    JPM  ...          N/A        N/A  None
15   2023-01-20  current    JNJ  ...          N/A        N/A  None
16   2023-01-20  current   INTC  ...          N/A        N/A  None
17   2023-01-20  current    IBM  ...          N/A        N/A  None
18   2023-01-20  current     HD  ...          N/A        N/A  None
19   2023-01-20  current     GS  ...          N/A        N/A  None
20   2023-01-20  current     GE  ...          N/A        N/A  None
21   2023-01-20  current     DD  ...          N/A        N/A  None
22   2023-01-20  current    CVX  ...          N/A        N/A  None
23   2023-01-20  current   CSCO  ...          N/A        N/A  None
24   2023-01-20  current    CAT  ...          N/A        N/A  None
25   2023-01-20  current     BA  ...          N/A        N/A  None
26   2023-01-20  current    AXP  ...          N/A        N/A  None
27   2023-01-20  current   AAPL  ...          N/A        N/A  None

[28 rows x 7 columns]
len(sp500com)
28

Treasury Data Unavailable After January 5th

Though I usually update treasury data every day, and as recently as Friday (2024-01-12), data link code USTREASURY/YIELD is now returning no data past 2024-01-05. Has the data code changed? The python usage example at https://data.nasdaq.com/data/USTREASURY-us-treasury/usage/quickstart/python now sees the quandl package utilized instead of nasdaqdatalink, and with a different data code / endpoint.

I know it seems a bunch of data has become deprecated, but I can't imagine this is the case for Treasury Data. Please let me know what is going on. Thanks

Module 'nasdaqdatalink' has no attribute 'get'

Hello,

The below code send me an error code: AttributeError: module 'nasdaqdatalink' has no attribute 'get'

import nasdaqdatalink
data = nasdaqdatalink.get('NSE/OIL')
print(data)

Python version 3.7.3
nasdaq-data-link in /usr/local/lib/python3.7/dist-packages (1.0.4)

Best Regards

EOD - What tables are available?

Hello,

I have an EOD product subscription, using python and the nasdaqdatalink.get_table(...) function.
I know that exist 'QUOTEMEDIA/TICKERS', 'QUOTEMEDIA/PRICES' and 'QUOTEMEDIA/DAILYPRICES' that I can query.
I'm interested also in like company master data overview, news, dividends important dates, financial's stats that stand behind each separate ticker.

What other tables exists, from where I can pull the data I'm interested in?
Where I can find a detailed and useful documentation on the database (list of tables at least)?
If my current subscription is not enough , what subscription I need?

Best regards,
Valter

Is this project dead?

The first datasets I'm looking at haven't been updated in 9 months: https://data.nasdaq.com/data/FRED/DGS10-10year-treasury-constant-maturity-rate

There's no way for me to ask about it because all the help links 404 on https://help.data.nasdaq.com/category/339-data-quality-issues which is the page that came up on Google

This library hasn't been updated in 6 mos and looking at the code here makes it quite unclear who should be contacted as it seems the contact info was possibly supposed to be updated months ago and it never happened for some reason: #29

Date Filters Possible for "ZILLOW/DATA" Dataset?

Hi team,

Is it possible to have date filters possible for the "ZILLOW/DATA" dataset?

This is my code right now:

    data = nasdaqdatalink.get_table(
        "ZILLOW/DATA",
        indicator_id="ZALL",
        region_id="62004",
        paginate=True,
    )

I would like to add an additional filter for the date since there can be many records available.

ResourceWarning: unclosed <ssl.SSLSocket

I just purchased a subscription but am getting errors.

Can you also confirm if this is the right way to filter for specific columns?

Code:

import nasdaqdatalink

sharadarKeyFile = './keys/nasdaqdatalinkapikey'

nasdaqdatalink.read_key(filename = sharadarKeyFile)

SHARADAR_TABLE_NAME = 'SHARADAR/SEP'

liveSEP = nasdaqdatalink.get_table(
        SHARADAR_TABLE_NAME,
        date = {'gte': '2022-08-01'},
        paginate = True,
        qopts = {
            'columns': ','.join(['ticker', 'date', 'open', 'close', 'closeadj', 'closeunadj'])
        }
    )

Throws the following exceptions:

Exception ignored in: <ssl.SSLSocket fd=80, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('192.168.1.225', 59345), raddr=('45.60.150.18', 443)>
Traceback (most recent call last):
  File "/Users/tommedema/opt/anaconda3/lib/python3.9/site-packages/nasdaqdatalink/model/datatable.py", line 31, in data
    return Data.page(self, **options)
ResourceWarning: unclosed <ssl.SSLSocket fd=80, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('192.168.1.225', 59345), raddr=('45.60.150.18', 443)>
Exception ignored in: <ssl.SSLSocket fd=79, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('192.168.1.225', 59237), raddr=('45.60.150.18', 443)>
Traceback (most recent call last):
  File "/Users/tommedema/opt/anaconda3/lib/python3.9/re.py", line 291, in _compile
    if isinstance(flags, RegexFlag):
ResourceWarning: unclosed <ssl.SSLSocket fd=79, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('192.168.1.225', 59237), raddr=('45.60.150.18', 443)>
Exception ignored in: <ssl.SSLSocket fd=78, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('192.168.1.225', 59329), raddr=('45.60.150.18', 443)>
Traceback (most recent call last):
  File "/Users/tommedema/opt/anaconda3/lib/python3.9/re.py", line 291, in _compile
    if isinstance(flags, RegexFlag):
ResourceWarning: unclosed <ssl.SSLSocket fd=78, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('192.168.1.225', 59329), raddr=('45.60.150.18', 443)>
Exception ignored in: <ssl.SSLSocket fd=80, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('192.168.1.225', 59347), raddr=('45.60.150.18', 443)>
Traceback (most recent call last):
  File "/Users/tommedema/opt/anaconda3/lib/python3.9/site-packages/nasdaqdatalink/model/datatable.py", line 31, in data
    return Data.page(self, **options)
ResourceWarning: unclosed <ssl.SSLSocket fd=80, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('192.168.1.225', 59347), raddr=('45.60.150.18', 443)>

Where is list of all ticker symbols

Hi, I want to use this code
data = nasdaqdatalink.Dataset('WIKI/AAPL').data()

Is there a way to get all tickers? I asked Google's BARD and it came up with
import nasdaqdatalink
nasdaq_data_link = nasdaqdatalink.NasdaqDataLink(api_key="YOUR_API_KEY")
tickers = nasdaq_data_link.get_all_tickers()
print(tickers)

Problem is "get_all_tickers" doesnt exist. Using the above example, how can I actually get all ticker symbols?

I have spent hours digging through tutorials and it is not intuitive or clear what the database and ticker values are. A list of each would be helpful.
If I am to loop through this: data = nasdaqdatalink.Dataset('WIKI/AAPL').data()
We need a a list of database and ticker codes

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.