-
Notifications
You must be signed in to change notification settings - Fork 61
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
Get eth price, update deps #88
Conversation
* update python to 3.9 * set static ethtx version to 0.3.8
if response.status_code == 200: | ||
eth_price = float(json.loads(response.content)["data"]["amount"]) | ||
return eth_price | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guess we can return 0 at least if coinbase is not responding
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And some caching is required, global var that holds price and timestamp to see when was the last time we got a price, we could refresh it every 5 minutes or something similar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
* You must provide a default database in the connection string or it will fail to start * Remove duplicated ENVs
EthTx
0.3.9 version