-
Notifications
You must be signed in to change notification settings - Fork 247
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
feat: updated history module #353
Conversation
What is the current |
…into monika/update-history-module
Currently history module is storing historical price data only. Sure, I moved it inside |
Codecov Report
@@ Coverage Diff @@
## v2/cosmos/stargate #353 +/- ##
=====================================================
Coverage ? 57.58%
=====================================================
Files ? 17
Lines ? 1339
Branches ? 0
=====================================================
Hits ? 771
Misses ? 472
Partials ? 96 |
Str("operation", "pricefeed"). | ||
Msg("updating token price and market cap history") | ||
|
||
prices, err := m.getTokenPrices() |
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.
I removed the part that forced all the prices to have LastUpdated
set to time.Now()
as I think it wasn't correct. @MonikaCat Was there a specific reason that one was there?
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.
@RiccardoM Last Updated
timestamp is fetched from the coingecko and it reflects the time when the price was last updated. We need the exact value at exact time every 1 hour to plot the graph. If price hasn't change within that 1 hour, the returned timestamp will be the same as one hour ago and it will not be stored in db as it will be a duplicated value. So that's why we should pass the current timestamp rather than the timestamp fetched from coingecko.
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.
Ok thanks, added back with a comment
Description
Closes: #348
token_price
table every 2 minstoken_price_history
table every 1hrAuthor Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change