niteshpatel / ministocks

Android Stocks Widget
http://niteshpatel.github.io/ministocks
MIT License
52 stars 37 forks source link

fetching data has stopped working, i'm looking for a possible solution #84

Open muziofg opened 1 year ago

muziofg commented 1 year ago

fetching data has stopped working, today, in the middle of the afternoon

I saw yahoo introducing/forcing "crumbs" also for " /v7/finance/" api requests Also I saw (using a browser inspector) an XHR request to https://query2.finance.yahoo.com/v1/test/getcrumb But before there is an, actually, obscure process to obtain the crumb using cookies

I'm still analyzing and looking to a workaround

Edit: As a temporary working solution you can fetch price data from an URL like this https://query1.finance.yahoo.com/v11/finance/quoteSummary/AMZN?modules=financialData or this (it's a CSV) https://query1.finance.yahoo.com/v7/finance/download/AMZN

But for the future is necessary to overcome the obstacle of the crumb

muziofg commented 1 year ago

I don't know why, but API has started working again as expected after 24h , so the app working also again as expected However webpages still querying API by adding the crumb

niteshpatel commented 1 year ago

Weird! Thanks for confirming though.

On Thu, 20 Apr 2023, 18:18 muziofg, @.***> wrote:

I don't know why, but API has started working again as expected after 24h However webpages still querying API by adding the crumb

— Reply to this email directly, view it on GitHub https://github.com/niteshpatel/ministocks/issues/84#issuecomment-1516684681, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA52MQ2GPZ4P6OJUIITFGK3XCFVX5ANCNFSM6AAAAAAXES5EKA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

noahfriedman commented 1 year ago

As of today, fetching data has stopped working again. I don't know if the cause is the same this time.

muziofg commented 1 year ago

I can confirm, It has stopped working 23 hours ago I see two different response this time, it depends that if cookies has submitted with the request

Without cookies (browser in incognito mode) the response is:

{"finance":{"result":null,"error":{"code":"Unauthorized","description":"Invalid Cookie"}}}

With cookie, but no crumb in the request, the response is:

"finance":{"result":null,"error":{"code":"Unauthorized","description":"Invalid Crumb"}}}

Hence, to fetch data it needs cookies and a valid crumb generated with it.

Also I can look that the previously proposed alternatives works yet without cookies or crumb (for now?)

Sn0whax commented 1 year ago

I see other Foss apps showing similar behavior as well. https://github.com/premnirmal/StockTicker/issues/330

Certainly related to how yahoo manages the cookies.

niteshpatel commented 1 year ago

I'm actually planning on not supporting this app anymore. If anyone wants to clone it and release on play store feel free.

muziofg commented 1 year ago

this is a sad news this app can survive with minor fixes

Sn0whax commented 1 year ago

I'm actually planning on not supporting this app anymore. If anyone wants to clone it and release on play store feel free.

One last (minor) update for us who love the app!? (Please?)

taviso commented 1 year ago

I'm actually planning on not supporting this app anymore. If anyone wants to clone it and release on play store feel free.

I don't know if it will change your mind, but I think it is just a single character change to start working again, just change the v7 to v6 in this line:

https://github.com/niteshpatel/ministocks/blob/f6e28d7a8c8142785049053813b67ef549bc722a/src/main/java/nitezh/ministock/dataaccess/YahooStockQuoteRepository2.java#L42

Is there any hope you could update the play store version with that change?

I built a quick apk with that change for my own use.. it seems to start working again for me :shrug:

If anyone else wants to try it, feel free:

ministocks.zip

mayaka1 commented 1 year ago

I'm actually planning on not supporting this app anymore. If anyone wants to clone it and release on play store feel free.

I knew this day might come someday. Well, just let me tell you that this is the best widget app to get an overview over 20+ stocks - all other apps provide useless fluff and never get to the nice density that ministocks provides. I would happily pay a small amount for a fix of the current issue. I have been using it since more than 5 years - hope you reconsider

muziofg commented 1 year ago

I'm actually planning on not supporting this app anymore. If anyone wants to clone it and release on play store feel free.

I don't know if it will change your mind, but I think it is just a single character change to start working again, just change the v7 to v6 in this line:

https://github.com/niteshpatel/ministocks/blob/f6e28d7a8c8142785049053813b67ef549bc722a/src/main/java/nitezh/ministock/dataaccess/YahooStockQuoteRepository2.java#L42

Is there any hope you could update the play store version with that change?

I built a quick apk with that change for my own use.. it seems to start working again for me shrug

If anyone else wants to try it, feel free:

ministocks.zip

so strange, I think this endpoint could be a short life But it's another workaround, the most simple workaround

mayaka1 commented 1 year ago

@jbadeau will fix it

Sn0whax commented 1 year ago

@jbadeau will fix it

\o/ let us know if its to be released here or if in a fork.

vokracko commented 1 year ago

@jurgen178 posted a solution for it in https://github.com/premnirmal/StockTicker/issues/330#issuecomment-1540588885

Sn0whax commented 1 year ago

I'm actually planning on not supporting this app anymore. If anyone wants to clone it and release on play store feel free.

I don't know if it will change your mind, but I think it is just a single character change to start working again, just change the v7 to v6 in this line:

https://github.com/niteshpatel/ministocks/blob/f6e28d7a8c8142785049053813b67ef549bc722a/src/main/java/nitezh/ministock/dataaccess/YahooStockQuoteRepository2.java#L42

Is there any hope you could update the play store version with that change?

I built a quick apk with that change for my own use.. it seems to start working again for me 🤷

If anyone else wants to try it, feel free:

ministocks.zip

Thanks for this, it appears to work sometimes?

penguine0815 commented 1 year ago

@centic9 has created a repository for ministocks - thanks for that.

Is it possible that the apk file is uploaded to F-driod store and to update from there? I don't have access to google app store, or how else is it possible to get the apk file?

centic9 commented 1 year ago

FYI, I don't plan to invest the time to learn publishing on f-droid as I don't do much Android development.

If you know and want to do it, please take any or all changes from my repo and go ahead!

For now I have published a debug-apk which works for me when installed manually at https://github.com/centic9/ministocks/releases/tag/version-81a.

You should be able to download it on your Smartphone and install it (after disabling some security-settings which disallows installing apps downloaded via the browser), naturally this is on your own risk if it should go wrong!

Sn0whax commented 1 year ago

Thanks so much for this! The widget appears not to work properly when using larger widgets though.

Sn0whax commented 1 year ago

I'm actually planning on not supporting this app anymore. If anyone wants to clone it and release on play store feel free.

I don't know if it will change your mind, but I think it is just a single character change to start working again, just change the v7 to v6 in this line:

https://github.com/niteshpatel/ministocks/blob/f6e28d7a8c8142785049053813b67ef549bc722a/src/main/java/nitezh/ministock/dataaccess/YahooStockQuoteRepository2.java#L42

Is there any hope you could update the play store version with that change?

I built a quick apk with that change for my own use.. it seems to start working again for me 🤷

If anyone else wants to try it, feel free:

ministocks.zip

This appears to work for me!

penguine0815 commented 1 year ago

FYI, I don't plan to invest the time to learn publishing on f-droid as I don't do much Android development.

If you know and want to do it, please take any or all changes from my repo and go ahead!

For now I have published a debug-apk which works for me when installed manually at https://github.com/centic9/ministocks/releases/tag/version-81a.

You should be able to download it on your Smartphone and install it (after disabling some security-settings which disallows installing apps downloaded via the browser), naturally this is on your own risk if it should go wrong!

Thanks for providing the link! But unfortunately the stocks, set in stocks setup, are not listed in the portfolio. Doesn't matter which widget size to use. In addition stock setup includes only 4 stocks instead of 10 previously. In the widget the stocks are not visible due to the fact that they are not listed in the portfolio.

Sn0whax commented 1 year ago

FYI, I don't plan to invest the time to learn publishing on f-droid as I don't do much Android development. If you know and want to do it, please take any or all changes from my repo and go ahead! For now I have published a debug-apk which works for me when installed manually at https://github.com/centic9/ministocks/releases/tag/version-81a. You should be able to download it on your Smartphone and install it (after disabling some security-settings which disallows installing apps downloaded via the browser), naturally this is on your own risk if it should go wrong!

Thanks for providing the link! But unfortunately the stocks, set in stocks setup, are not listed in the portfolio. Doesn't matter which widget size to use. In addition stock setup includes only 4 stocks instead of 10 previously. In the widget the stocks are not visible due to the fact that they are not listed in the portfolio.

Same issue here, no concerns about lack of fdroid!

centic9 commented 1 year ago

Thanks for providing the link! But unfortunately the stocks, set in stocks setup, are not listed in the portfolio. Doesn't matter which widget size to use. In addition stock setup includes only 4 stocks instead of 10 previously. In the widget the stocks are not visible due to the fact that they are not listed in the portfolio.

Sorry, I cannot reproduce any of this, everything works for me, I am on Android 13, maybe this is an issue with different Android Version? Which are you using?

centic9 commented 1 year ago

Small update: I found one issue with renaming of the applicationId and tried to fix this. Can you re-try with the latest apk from the new release https://github.com/centic9/ministocks/releases/tag/version-81b ?

Sn0whax commented 1 year ago

Small update: I found one issue with renaming of the applicationId and tried to fix this. Can you re-try with the latest apk from the new release https://github.com/centic9/ministocks/releases/tag/version-81b ?

Works!

penguine0815 commented 1 year ago

Small update: I found one issue with renaming of the applicationId and tried to fix this. Can you re-try with the latest apk from the new release https://github.com/centic9/ministocks/releases/tag/version-81b ?

Many thanks for quick fixing! Now everything is fine for me. Also on Android 6.0.1.

BaumiCoder commented 1 year ago

Small update: I found one issue with renaming of the applicationId and tried to fix this. Can you re-try with the latest apk from the new release https://github.com/centic9/ministocks/releases/tag/version-81b ?

Works also on my device. Thank you @centic9. But if I understand @niteshpatel right, there will be no updates on the app stores (F-Droid & Google Playstore) any more :confused: So is there any one, who can take over the maintenance (incl. release on the stores)? I sadly have no experience with android development and release.

centic9 commented 1 year ago

It seems the "v6" API was now shutdown by Yahoo, likely because everyone switched over from "v7"

BarFoos81 commented 1 year ago

So is there any one, who can take over the maintenance (incl. release on the stores)? I sadly have no experience with android development and release.

I really hope, there is somebody out there who can take over the maintenance of that wonderful widget. I would be happy to pay a few bucks for buying it.

BaumiCoder commented 1 year ago

It seems the "v6" API was now shutdown by Yahoo, likely because everyone switched over from "v7"

Yes, it seems there was an server side change yesterday or today. Yesterday shortly before I wrote the comment here, I installed the new version. There I got the actual prices of the stokes. Since today morning (European central time) the prices are not updated anymore and new stokes also get no price information.

penguine0815 commented 1 year ago

It seems the "v6" API was now shutdown by Yahoo, likely because everyone switched over from "v7"

@centic9 Do you see a way to get ministocks running again? Your help would be very appreciated

Could the fix work for ministocks as well? https://gitlab.com/cosmosapps/candle/-/commit/d689600361ffd9b14f496740b479913f303add36

eriknh commented 1 year ago

Looks like Yahoo is moving to a paid model for Finance API access: https://docs.google.com/forms/d/e/1FAIpQLSeyb7xMtZFjoNYI7XG1rjlhUopKAxdLAfSRcaPxg9p-9ii-_g/viewform

skeletonometer commented 1 year ago

I forked the project and made it work with TwelveData which has a free tier, but you need to sign up for your own API key (https://twelvedata.com/pricing look for the basic plan) and enter it in the settings of the app for it to load properly.

Feel free to build and enjoy

https://github.com/skeletonometer/ministocks

penguine0815 commented 1 year ago

I forked the project and made it work with TwelveData which has a free tier, but you need to sign up for your own API key (https://twelvedata.com/pricing look for the basic plan) and enter it in the settings of the app for it to load properly.

Feel free to build and enjoy

https://github.com/skeletonometer/ministocks

Hi, thank you so much for adopting the app! Can you please provide an apk file for download in your repository, for all of us who don't know how to build it?

rammjet commented 1 year ago

I use a Rainmeter plugin on Windows that taps into CNBC. Not sure how.

https://www.deviantart.com/mordasius/art/Market-Prices-755702746

skeletonometer commented 1 year ago

I forked the project and made it work with TwelveData which has a free tier, but you need to sign up for your own API key (https://twelvedata.com/pricing look for the basic plan) and enter it in the settings of the app for it to load properly. Feel free to build and enjoy https://github.com/skeletonometer/ministocks

Hi, thank you so much for adopting the app! Can you please provide an apk file for download in your repository, for all of us who don't know how to build it?

Wouldn't say I fully adopted it, just fixed it for my personal use and figured I'd upload the swap!

I made a release on the fork you can grab the APK if you like:

https://github.com/skeletonometer/ministocks/releases/tag/ministocks-82

TheMegamind commented 1 year ago

Nice work @skeletonometer!

marksibert commented 1 year ago

Great work! The only thing I've noticed so far is that indices (^DJI, ^SPX, etc) don't update, but normal stock symbols do. I'm guessing TwelveData uses different symbols for those indices.

Thank you so much for throwing a lifeline to this widget! This has always been my favorite stock tracker. I'm glad to see it still has some life.

Update: The list of indices can be found here: https://api.twelvedata.com/indices?source=docs TwelveData does not appear to have the '^' symbol at the beginning like Yahoo did. When I changed it to just "DJI" and "SPX", they updated fine. (And verified the prices were correct at bigcharts.com.)

rammjet commented 1 year ago

Try removing the caret symbol. Sent from my iPhoneOn Jun 17, 2023, at 4:05 PM, Mark Sibert @.***> wrote: Great work! The only thing I've noticed so far is that indices (^DJI, ^SPX, etc) don't update, but normal stock symbols do. I'm guessing TwelveData uses different symbols for those indices. Thank you so much for throwing a lifeline to this widget! This has always been my favorite stock tracker. I'm glad to see it still has some life.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

penguine0815 commented 1 year ago

@skeletonometer, thanks for providing the APK. I entered the API key from twelvedata in the settings of the app. Unfortunately, no values are displayed in the widget, neither for stocks nor for cryptos - only horizontal lines where the prices should be. But at twelvedata in my statistic I can see the used API credits. Could it be a problem with my tablets OS, Android 6.0.1?

skeletonometer commented 1 year ago

Thanks all - and @rammjet is correct, carets seem to be an issue for Twelvedata and I didn't mess with the symbol lookup at all.

@penguine0815 I'm not sure, possibly. If I ever mess around more I'll try an emulator and see what I get for you, but not sure when that will be

penguine0815 commented 1 year ago

@penguine0815 I'm not sure, possibly. If I ever mess around more I'll try an emulator and see what I get for you, but not sure when that will be

It is also no longer possible to change the custom display text in the settings. Ministocks has always been my favorite stock tracker for the last years and I don't want to miss it. I'm glad to hear that you will investigate in this matter and awaiting your feedback - Many thanks.

Edit: After deleting all data and fresh install: cryptos are updated. However, none of my shares are found (eg. I want to get "ABBA" in Euro). But, if not found shares are in the portfolio, the cryptos are not updated either. So far I have not found a way to get to the correct symbols.

rammjet commented 1 year ago

So far I have not found a way to get to the correct symbols.

https://support.twelvedata.com/en/articles/5620513-how-to-find-all-available-symbols-at-twelve-data

penguine0815 commented 1 year ago

@rammjet: https://support.twelvedata.com/en/articles/5620513-how-to-find-all-available-symbols-at-twelve-data

Thanks, but I had read this documentation and found the symbols in the list: https://api.twelvedata.com/stocks?source=docs The problem is, that in the basic plan only a reduced number of shares are included, in particular most of the prices in euros are not fetched.

Matatu commented 1 year ago

Unfortunately many symbols are not found, even if there are available via the websocket.

https://api.twelvedata.com/time_series?symbol=VOW3:XETR&interval=1min&apikey={YOURAPIKEY}

(EDIT: I was wrong here, if you can get the symbol via API they will work after some time, but not instantly)

Description lookup seems still use yahoo.

There is some potential to use twelvedata, but there is no business model which will match for updating such simple App a few times a day. With "free" we are missing many symbols and the paid services provide too much. There must be something between, maybe there are other similar services at the market which provide a more passable price model,

Matatu commented 1 year ago

There is an update from skeletonometers version.

https://github.com/skeletonometer/ministocks/releases/tag/ministocks-82

sector9999 commented 1 year ago

I'm actually planning on not supporting this app anymore. If anyone wants to clone it and release on play store feel free.

I don't know if it will change your mind, but I think it is just a single character change to start working again, just change the v7 to v6 in this line:

https://github.com/niteshpatel/ministocks/blob/f6e28d7a8c8142785049053813b67ef549bc722a/src/main/java/nitezh/ministock/dataaccess/YahooStockQuoteRepository2.java#L42

Is there any hope you could update the play store version with that change?

I built a quick apk with that change for my own use.. it seems to start working again for me 🤷

If anyone else wants to try it, feel free:

ministocks.zip

@taviso Tavis, how safe your solution is? Any risks with that? Thx

sector9999 commented 1 year ago

Btw. a message when trying to install: Screenshot_20230728-102654_Package installer

Matatu commented 1 year ago

@taviso Tavis, how safe your solution is? Any risks with that? Thx

The v6 API is not working anymore (like v7), please read the thread,

penguine0815 commented 2 months ago

I forked the project and made it work with TwelveData which has a free tier, but you need to sign up for your own API key (https://twelvedata.com/pricing look for the basic plan) and enter it in the settings of the app for it to load properly. Feel free to build and enjoy https://github.com/skeletonometer/ministocks

Hi, thank you so much for adopting the app! Can you please provide an apk file for download in your repository, for all of us who don't know how to build it?

Wouldn't say I fully adopted it, just fixed it for my personal use and figured I'd upload the swap!

I made a release on the fork you can grab the APK if you like:

https://github.com/skeletonometer/ministocks/releases/tag/ministocks-82

@skeletonometer :unfortunately since june 15th the stocks are no longer updated by twelvedata. I also tried out with a new account at twelvedata (new API key) - doesn't work either. Are you willing to look for a solution? Thanks a lot!

decadent commented 2 months ago

premnirmal/StockTicker seems to fetch the numbers alright, but its formatting is less compact than that of MiniStocks. Would be brilliant to have MiniStocks back. =)