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

error response recieved from upstream api #26

Closed
sargon2 opened this issue Apr 19, 2023 · 11 comments
Closed

error response recieved from upstream api #26

sargon2 opened this issue Apr 19, 2023 · 11 comments

Comments

@sargon2
Copy link

sargon2 commented Apr 19, 2023

I'm getting error response recieved from upstream api on all requests. In the log, it says {"code":"Unauthorized","description":"Invalid Cookie"}.

@sargon2
Copy link
Author

sargon2 commented Apr 20, 2023

Today it seems to be working again.

@valankar
Copy link

valankar commented Apr 20, 2023

I think Yahoo temporarily did something with their API. The yahooquery Python library also noticed issues:

dpguthrie/yahooquery#178

It was not working for about a day for me, but now it is working.

@sargon2 sargon2 closed this as not planned Won't fix, can't repro, duplicate, stale Apr 20, 2023
@sargon2
Copy link
Author

sargon2 commented May 8, 2023

This issue seems to be back, and has been going on for a few days.

@valankar
Copy link

valankar commented May 8, 2023

Perhaps reopen this bug.

@psanford
Copy link

psanford commented May 8, 2023

Changing the yahoo api url from v7 to v6 should give you something that works right now. There's a PR for that here: #27

@sargon2
Copy link
Author

sargon2 commented May 8, 2023

I don't have permission to reopen the bug.

@kfwalther
Copy link

Thanks @psanford, ran go get github.com/piquette/finance-go@latest to grab the latest version (v1.1.0) to include the PR, and it fixed the issue!

@KasperKornak
Copy link

Guys, PR opened by @alai04 from last month fixed it for a while. However, about three days ago I've noticed that error response from upstream api occurred again and after looking through this issue i tried to access url mentioned and got the following response:

{"finance":{"result":null,"error":{"code":"Unauthorized","description":"Invalid Crumb. For Developers - https://bit.ly/yahoo-finance-api-feedback"}}}

So after heading to the link, they basically say that they can't redistribute financial data from 3rd parties in API form.

@sargon2
Copy link
Author

sargon2 commented Jun 5, 2023

I switched to @psanford's fork and it seems to be working, at least for now: https://github.com/psanford/finance-go

@kfwalther
Copy link

I also began seeing the Unauthorized errors again, even after switching to v1.1.0. Looks like the fork might be the way to go for now.

@sahilsk11
Copy link

Bumping this, as I received the same error on v1.1.0 when I run:

q, err := equity.Get("AAPL")
if err != nil {
  // Uh-oh.  
  panic(err)
}

// Success!
fmt.Println(q)

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

6 participants