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

Allowance fields should not be integers #1

Open
szmija opened this issue Dec 16, 2021 · 0 comments
Open

Allowance fields should not be integers #1

szmija opened this issue Dec 16, 2021 · 0 comments

Comments

@szmija
Copy link

szmija commented Dec 16, 2021

Currently Allowance.cost and Allowance.remaining are both of type long. According to the documentation (https://docs.cryptowat.ch/rest-api/rate-limit), credit cost per API call is never higher than 0.01. This makes Allowance.cost always equal to zero and thus completely useless. Allowance.remaining is also much less useful when rounded to full credits.

I would recommend using another data type instead (decimal or at least double/float) or multiply cost/remaining values returned by Cryptowatch by 1000 before casting them to long, and document those values as milli-credits.

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