Cryptowatch-API icon indicating copy to clipboard operation
Cryptowatch-API copied to clipboard

Allowance fields should not be integers

Open szmija opened this issue 4 years ago • 0 comments

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.

szmija avatar Dec 16 '21 16:12 szmija