diff --git a/piker/accounting/_mktinfo.py b/piker/accounting/_mktinfo.py index fa606fcb..5d9edbd6 100644 --- a/piker/accounting/_mktinfo.py +++ b/piker/accounting/_mktinfo.py @@ -69,8 +69,9 @@ AssetTypeName: Literal[ # egs. stock, futer, option, bond etc. -def float_digits( - value: float, +def dec_digits( + value: float | str | Decimal, + ) -> int: ''' Return the number of precision digits read from a decimal or float @@ -85,6 +86,9 @@ def float_digits( ) +float_digits = dec_digits + + def digits_to_dec( ndigits: int, ) -> Decimal: