-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Refactoring Spotbit #55
Conversation
ac75483
to
58b5df0
Compare
Add `/exchanges` endpoint that returns exchange metadata. (Fixes BlockchainCommons#54) Cleanup variable and function naming style (https://google.github.io/styleguide/pyguide.html#316-naming) to fix BlockchainCommons#51. Freeze dependencies. Cleanup imports. Cleanup logging. Improve error handling. Refactor configuration settings. Load settings using dotenv. Use `flask run` to run the server. Begin refactor to simplify data collection. Use concurrent requests to servers. Remove unused functions. Remove database storage.
Use threads for HTTP requests.
@icculp Please could you review this PR? |
Fix getting candles at specific dates.
This is closed by #58 which was based on this branch. |
What was the rationale for removing the database? Now, spotbit does not have any kind of caching-functionality, does it? |
|
I know that I'd like to see a database as an option, even if it isn't used for caching, as historical information may not always be available in the future. But this is a separate use case than the current price, and tying them together (both a cache and a historical database) in a single system caused problems. A new architecture is needed that separates them. |
Is there a new issue on this topic? Is should be be linked here, as this issue is closed. |
I can't follow the rationale to be honest. Price data could be usefull in so much more scenarios than just transacting/accounting and having historical data around might also be very useful. E.g. for specter-desktop there is warden which we currently transform into a specter-extension. This one definitely likes to have historical price-data available. Also one of the Summer-of-bitcoin-projects is to make spotbit a specter-plugin and as the DB is removed, the project effectively forked this project. |
There are more efficient ways, than querying rate limited exchange APIs, of getting all historical price data, if one wants an offline record for a given period without requiring data to be sourced from specific exchanges. Eg. One could download a CSV for all of Bitcoin's recorded price history from:
That could of course be added as a feature to SpotBit but it's already trivial for an app to do that for itself, no? |
This is imho exactly the stuff which an app don't want to deal with. In your project description, you write:
This is imho the point: As an app i don't want to care how that data is obtained. I just want to use it and it's happy that some other app (spotbit) is taking care of the nitty-gritty details of that. Making it just available without caching it somehow doesn't add much value and it's also not very efficient for the operator, operating spotbit for a number of users (e.g. a raspiblitz owner being the uncle jim of his family OR a publicly available spotbit instance operated by someone who wants to give back to the community). This might even result in blacklisting the instance because it creates too many useless requests. |
/exchanges
endpoint that returns exchange metadata. Fixes SpotBit should provide human-friendly names for exchanges. #54.http://localhost:5000/docs
To be done in separate PRs.