-
Notifications
You must be signed in to change notification settings - Fork 17
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
System.InvalidOperationException: Result has no value. #34
Comments
I have the same issue (UK). It looks like the field PriceHistory cannot be retrieved. Looking at the error (in Visual Studio) it says: PriceHistory {Error: ErrorResult { Message = Response status code does not indicate success: 401 (Unauthorized)., Exception = System.Net.Http.HttpRequestException: Response status code does not indicate success: 401 (Unauthorized). No idea what is causing it but VPNing into the US did not solve the problem. |
I have the same issue, other packages like the yfinance python package also have reports of similar issues. Hopefully Yahoo hasn't pulled the plug. |
Issue persists. Some top level data (name, current price etc) is returned but price history is missing. |
I tested the Python yFinance package and it works now, not sure if the previous issue was related to the issue with this package. If I try to download a csv of historical data from Yahoo Finance it now requires me to login which it didn't before. Here's another example of calling historical data on AAPL using the yFinance method: The above returns JSON data which can be used to construct the price ticks. |
@drakovic23 thanks for the addtitional info - so if I see correctly it should be possible to change the url in this package, right? I just quickly tried the url from the python package with c# and no matter what headers I added to the httpclient I always got a error "429 - too many requests". |
I think the only header I had to adjust was the text/json to text/csv. The real issue is that the tickparser parses CSV data whereas the other URL returns JSON so if you adjust the URL you'd have to adjust the tickparser as well. I created a fork here: https://github.com/drakovic23/YahooQuotesApiFork that currently pulls price history correctly however it fails 2 tests, one is a rounding error to do with history in a different base currency that I am stuck on and I'm not sure about the other test that is failing at the moment. I'll try to get the tests to pass and then cleanup the code a bit as it's a mess right now. I also didn't add any other dependencies but it may be better to use a different JSON parsing mechanism possibly from the Newtonsoft package. EDIT: |
@drakovic23 thanks for your effort! - i will try your package when I have time and maybe also have a look at the tickerparser (and in the meantime hope that maybe @dshe reappears) |
Ta @drakovic23 ; that's got me up and running again. |
The new version now provides price history. Sorry for the delay! |
it works, thank you |
Hello,
there seems to be no data returned since yesterday and I'm getting this error
since yesterday (from EU) - it doesn't look like another cookie & crumb issue. I tried it with version 6.0.0. and 5.5.8.. Anyone has an idea what might be the cause?
The text was updated successfully, but these errors were encountered: