Skip to content
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

RAM/Token price charts do not support 30d view #388

Open
aaroncox opened this issue Feb 24, 2025 · 0 comments
Open

RAM/Token price charts do not support 30d view #388

aaroncox opened this issue Feb 24, 2025 · 0 comments

Comments

@aaroncox
Copy link
Member

For the Token/RAM price charts (e.g. on the homepage) we offer a dropdown to select a range between 1 day, 7 day, and 30 day. The data source it pulls from though is always the 7d, so the 30d chart doesn't display any additional data.

This is happening because the API wrappers we've setup are hardcoded to the 7d value:

const response = await fetch(`${network.config.endpoints.metrics}/marketprice/ram/1h/7d`);

`${network.config.endpoints.metrics}/marketprice/${systemtoken.name.toLowerCase()}usd/1h/7d`

Additional timeframes are available on that endpoint, such as:

marketprice/ram/1h/30d or marketprice/ram/1d/30d

I'm not sure which will display best, but we have some options there.

I think we need to either update this endpoint to accept different timeframe ranges, or create new endpoints specifically for the timeframe ranges we need. Then the chart elements themselves may need updates to fetch this new data properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant