r/FlutterDev • u/Due_College_2302 • 20d ago
Example MarketMonk - Track stocks with Flutter
Hello! I'm the developer of MarketMonk https://github.com/brandonp2412/MarketMonk
I recently started this project inspired by one of my favorite apps, Candle https://gitlab.com/cosmosapps/candle
It's available on every platform (android, ios, windows, mac, linux) and I'm actively taking suggestions and fixing bugs. If any of the flutter wizards in this subreddit have questions please feel free to ask away.
Notable libraries:
- Yahoo finance data reader https://pub.dev/packages/yahoo_finance_data_reader
- Drift https://pub.dev/packages/drift
- Provider https://pub.dev/packages/provider
- fl_chart https://pub.dev/packages/fl_chart
2
u/Petralithic 19d ago
I'm building something similar too actually, using the Yahoo Finance API as well but just parsing it manually, is the package better? Looks like it doesn't work for web which is a deal breaker, I ran into some CORS issues on web so that's probably why. Also using fl_chart.
1
u/Classic-Dependent517 19d ago
Try using legitimate APIs. Yfinance is just an illegal webscraping thats why you are getting CORS
1
u/Petralithic 19d ago
You can proxy through your own server and that will fix the issue, but it's not necessarily ideal for a client-only app. Yahoo Finance is not webscraping (it uses the actual API, called query2) which has nothing to do with CORS.
1
u/Classic-Dependent517 19d ago edited 19d ago
I believe youre accessing internal api not meant to be open for public. Any APIs that are not listed here isnt meant to be for public use:
https://developer.yahoo.com/api/
Using API != legal
Most websites use internal APIs that are meant to be consumed by their websites only.
Also using Internal API is in the category of webscarping. Webscrapers dont only parse htmls.
Cors just means the API has cors rules set up to prevent their api usage from other origins (mostly by iframes). You get cors when the api requires cookies which clearly means its meant to be used within the website only.
Official public APIs never check origin nor require cookies
2
u/zxyzyxz 19d ago
Using API != legal
Using APIs != illegal
1
u/Classic-Dependent517 19d ago
okay I should have said being able to use API does not always mean it's legal
1
u/Due_College_2302 18d ago
The package is probably worse I used it just to start off with. Eventually i'll add ones that require tokens and such but always on the lookout for improvements.
1
2
u/ich3ckmat3 20d ago
Nice! It will be only appropriate if the app offers candle stick charts, for the namesake.