You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To calculate it, we need to save 2 values as follows:
30d should be the last 1 month full number of days, value saved every day for the yam price, averaging it over the days to get the value (from 1st to last day of the month).
now should be the last 30 days from today, value is also saved every day (example today is the 14th of the month, we average it as well over the days from: 14th day of last month - to date, this value is more up to date and not a fixed value).
/30avg
{
"30d": "2.00",
"now": "1.63",
}
Follow the .env.example to add or use secrets if needed.
Requirements
Adding call for the specified endpoint.
Caching the data using cron to the mongo database.
Use your own mongo database for testing.
On your PR include examples of what the endpoint is returning.
Documenting the code.
The text was updated successfully, but these errors were encountered:
Description
We need to add a primary call to the coingecko api with a fallback to a secondary api of public choice, to get the yam 30 days avg price.
30d
should be the last 1 month full number of days, value saved every day for the yam price, averaging it over the days to get the value (from 1st to last day of the month).now
should be the last 30 days from today, value is also saved every day (example today is the 14th of the month, we average it as well over the days from: 14th day of last month - to date, this value is more up to date and not a fixed value)./30avg
Follow the
.env.example
to add or use secrets if needed.Requirements
The text was updated successfully, but these errors were encountered: