dominiktraxl/pykrakenapi

Numeric values should not be converted to `float`

Opened this issue · 0 comments

Currently all numeric values returned by the API, which the API returns as strings, are converted by this library into floats. This is handy for working with the API results but could lead to problems due to floating point precision issues, which can be especially problematic in financial contexts such as this one. The whole reason why the API gives numeric results as strings is to avoid these kinds of problems. Perhaps the best solution would be to use Python's built-in decimal.Decimal type.