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

Price info percent change calculation #139

Merged

Conversation

nguvictor
Copy link
Member

Fixes #129
The number that is coming from the alphadex api, was strange so I did the calculation on our side with the alphadex open price.
Formula: ((last-open)/open)*100

Known Issues:
Floating point precision, sometimes there are 49.99999996 in the calculation. Potential fix was parseFloat(x).toPrecision(8), but this returns a string vs a number.

@netlify
Copy link

netlify bot commented Sep 28, 2023

Deploy Preview for chipper-sunburst-578cfe ready!

Name Link
🔨 Latest commit d122698
🔍 Latest deploy log https://app.netlify.com/sites/chipper-sunburst-578cfe/deploys/6514fd6c1a3b11000865b606
😎 Deploy Preview https://deploy-preview-139--chipper-sunburst-578cfe.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@EvgeniiaVak EvgeniiaVak merged commit fab3d5f into DeXter-on-Radix:main Sep 29, 2023
4 checks passed
@nguvictor nguvictor deleted the price-info-percent-change branch October 2, 2023 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

24h Change calculation appears incorrect
2 participants