PacktPublishing / Python-for-Algorithmic-Trading-Cookbook

Python for Algorithmic Trading Cookbook, published by Packt
MIT License
266 stars 81 forks source link

Deprecated CHRIS Database on Nasdaq Data Link (Chapter 1 Example No Longer Works) #5

Closed ZeeThirawat closed 1 month ago

ZeeThirawat commented 2 months ago

In Chapter 1 of the course, the example for retrieving data from Nasdaq Data Link no longer works. Specifically, in the notebook: 01a_diving_into_continuous_futures_data_with_nasdaq_data_link.ipynb

The following code:

nasdaqdatalink.get('CHRIS/CME_ES1')

fails due to the deprecation of the CHRIS database.

I contacted Nasdaq Data Link for clarification, and they informed me that:

Unfortunately, the CHRIS database has been deprecated and is no longer updated on Nasdaq Data Link. At this time, we do not currently have an alternate data feed.

They further explained that:

Free data feeds may be deprecated for various reasons, such as no longer meeting quality standards or due to technical issues preventing data access, etc.

This issue affects the current functionality of the example in the course and needs a replacement or update to reflect available data sources.

datalifenyc commented 2 months ago

I noticed the same issue. I was going to send an email to Nasdaq support (connect@data.nasdaq.com) too, but decided to check here first. Thanks for the info you provided.

A few additional things I noticed regarding the Nasdaq Data Link Python API Client:

  1. It was last updated 2 years ago (2022-08-29). There is a possibility that it is no longer being maintained.

  1. The example provided in the GitHub repo for data-link-python returns the same error message:
    import nasdaqdatalink
    data = nasdaqdatalink.get('NSE/OIL')

    Output:

    JSONDecodeError
    ...
    DataLinkError: (Status 410) Something went wrong. Please try again. If you continue to have problems, please contact us at connect@data.nasdaq.com.

  1. Status code 410 is not listed on the Nasdaq Data Link documentation guide page: ERROR CODES - API FOR TABLES DATA

According to Mozilla's mdn web docs, this code is 410 Gone:

The HTTP 410 Gone client error response status code indicates that the target resource is no longer available at the origin server and that this condition is likely to be permanent. A 410 response is cacheable by default.


  1. Digging deeper into the documentation [FOR_DEVELOPERS.md], there is an alternate method for accessing the datasets:
    data = nasdaqdatalink.Dataset('WIKI/AAPL').data()

Unfortunately, the output will return the same DataLinkError: (Status 410) error message.


  1. In an attempt to see if any datasets could be retrieved, I searched the Nasdaq Data Link database for futures with "Free" filter and 2 results were returned:

image

image

image

The example provided worked for this QDL/FON dataset:

image

However, the CHRIS/CME_ES1 dataset is not available:

image

For NSE/OIL the response message is: The following datatable 'NSE/OIL' does not exist.

image

Page No Longer Exists

image


Next Steps:

I'll see if there is another way to get the equivalent dataset using an alternative API:

Source API
E-Mini S&P 500 Future Continuous Contract marketwatch
E-Mini S&P 500 Dec 24 (ES=F) yfinance
ZeeThirawat commented 2 months ago

I noticed the same issue. ...

Thank you for your hard work and for sharing this valuable information.

I tried digging deeper as well, but only did your points 1-3.

Hopefully, the author will update his book.

jasonstrimpel commented 1 month ago

As indicated, Nasdaq deprecated the CHRIS dataset.