Skip to content

401 response code running YahooReturnSource #2

Open

Description

@chadworth

Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL: https://query1.finance.yahoo.com/v7/finance/download/BLK?period1=1104537600&period2=1401580800&interval=1d&events=history&crumb=jValG4P3fLj
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1876)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
at com.zavtech.morpheus.util.http.HttpClient$DefaultClient.execute(HttpClient.java:133)
... 10 more

Activity

  1. Zavster commented on Aug 17, 2017

    @Zavster
    Contributor

    Hey chadworth, apologies but the Yahoo adapter is currently broken as it was written a few years ago and Yahoo has discontinued some of the services on which it depends (hence why the adapter is not available on Maven Central at this moment). I do plan to address the issues in the next few weeks and will post a reply here when it is working again. Be aware however that when it is fixed it can break at anytime as it relies on screen scrapping and other non-supported apis in Yahoo Finance which are subject to change without notice. So the adapter is fine for research purposes, but I would not rely on it for production. If you are looking for end of day close prices, you can use the Quandl adapter and the WIKI price source: https://www.quandl.com/data/WIKI-Wiki-EOD-Stock-Prices

  2. chadworth commented on Aug 17, 2017

    @chadworth
    Author

    Yep. We could call the library below which seems to be kept up-to-date with Yahoo:
    https://github.com/sstrickx/yahoofinance-api

  3. Zavster commented on Aug 17, 2017

    @Zavster
    Contributor

    Thanks for the pointer, I'll take a look at that

  4. chadworth commented on Aug 27, 2017

    @chadworth
    Author

    I found they have a new JSON api that works much better. I sent a PR for it here: https://github.com/sstrickx/yahoofinance-api/pull/96/files

    You might want to just copy in the code from this PR

  5. Zavster commented on Oct 2, 2017

    @Zavster
    Contributor

    This has been fixed in the latest release which is now on Maven Central. The documentation can be found at the link: http://www.zavtech.com/morpheus/docs/providers/yahoo/

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