freqtrade_origin/freqtrade/util/ft_precise.py

13 lines
337 B
Python
Raw Normal View History

2022-08-10 11:26:06 +00:00
"""
Slim wrapper around ccxt's Precise (string math)
2022-08-10 11:29:04 +00:00
To have imports from freqtrade - and support float initializers
2022-08-10 11:26:06 +00:00
"""
from ccxt import Precise
class FtPrecise(Precise):
2022-08-10 11:29:04 +00:00
def __init__(self, number, decimals=None):
if not isinstance(number, str):
number = str(number)
super().__init__(number, decimals)