Float rates become exponential notation
baddwin opened this issue Ā· comments
Badwi commented
Using lower rate base currencies like IDR produces scientific notation, and less precise.
{
"amount": 1.0,
"base": "IDR",
"date": "2020-04-30",
"rates": {
"USD": 7.0e-05
}
}
Hakan Ensari commented
Good catch, noted. Google returns 0.000066 USD for 1 IDR; Frankfurter should format likewise.
Hakan Ensari commented
@baddwin, returned values should now be more preciseāfor instance, 0.000067 instead of 0.00007.
The scientific notation issue must be a client-side; the API is returning decimals.
Badwi commented
@hakanensari awesome, thank you.
Yeah, I think so. I use Insomnia REST client for querying the API, fyi.
But no worries, I can pull the decimal values in the backend.