From 76cd5519b3a429c4aa7283d75a3244b8833e7f3c Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 21 Mar 2023 10:33:38 -0400 Subject: [PATCH] Fix `Symbol.tick_size_digits`, add `.price/size_tick` props --- piker/accounting/_mktinfo.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/piker/accounting/_mktinfo.py b/piker/accounting/_mktinfo.py index 63b89f75..fa606fcb 100644 --- a/piker/accounting/_mktinfo.py +++ b/piker/accounting/_mktinfo.py @@ -454,12 +454,20 @@ class Symbol(Struct): @property def tick_size_digits(self) -> int: - return float_digits(self.lot_tick_size) + return float_digits(self.tick_size) @property def lot_size_digits(self) -> int: return float_digits(self.lot_tick_size) + @property + def price_tick(self) -> Decimal: + return Decimal(str(self.tick_size)) + + @property + def size_tick(self) -> Decimal: + return Decimal(str(self.lot_tick_size)) + @property def broker(self) -> str: return list(self.broker_info.keys())[0]