-
Notifications
You must be signed in to change notification settings - Fork 285
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
BUG FIX: decimal vs float. And timestamp issue! #108
Comments
thanks for pointing this out. This seems like a good candidate for a pull request |
I have found another issue that I feel belongs in this library. two issues: (1) the library should convert timestamps -> datetime's. (2) bittrex returns an incorrect timestamp when milliseconds are all zero's. I am doing a sloppy recursive search for key names because bittrex documents are horrible and i don't know all the places across methods this occurs on. Attached is the code I am using to fix these issues...
|
HELLO, I am writing to share a bug and it's fix i found in the program. Issue is that '.json' converts string numbers to floats. Float's should NOT be used within financial applications! IEEE 754 is not for exact numerical representation but for approximate representation by representation numbers on a fractional base 2. Decimal should be used when exact representation is necessary. https://docs.python.org/2/library/decimal.html
Not using decimal over float can cause a situation when your balances or market value come back incorrect causing a failed trade. Note: decimals cannot be constructed correctly using .from_float method. float vs decimal...
floats:
decimal:
BUG FIX:
The text was updated successfully, but these errors were encountered: