-
As the title states, why does this package convert all floats to Decimal? I understand Python has issues with floating point arithmetic, but I am not sure if Cryptofeed does any calculations on the data. Binance sends its values as strings to preserve precision, wouldn't this be enough for Cryptofeed/Cryptostore's use case? Awesome project btw! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
had to standardize on something. At least with decimals you can do math operations and the like. Because the data comes as a string across the wire via the websocket, when we load the json data into a dictionary we can serialize it directly to a decimal. if we were to do it as a float and then to a string or decimal, precision would be lost |
Beta Was this translation helpful? Give feedback.
had to standardize on something. At least with decimals you can do math operations and the like. Because the data comes as a string across the wire via the websocket, when we load the json data into a dictionary we can serialize it directly to a decimal. if we were to do it as a float and then to a string or decimal, precision would be lost