diff --git a/piker/data/__init__.py b/piker/data/__init__.py index af036b24..addfefbb 100644 --- a/piker/data/__init__.py +++ b/piker/data/__init__.py @@ -276,6 +276,7 @@ async def open_feed( symbol = Symbol( key=sym, tick_size=si.get('price_tick_size', 0.01), + lot_tick_size=si.get('lot_tick_size', 0.0), ) symbol.broker_info[brokername] = si diff --git a/piker/data/_source.py b/piker/data/_source.py index e6194a90..e85727c2 100644 --- a/piker/data/_source.py +++ b/piker/data/_source.py @@ -97,6 +97,9 @@ class Symbol(BaseModel): """ return float_digits(self.tick_size) + def lot_digits(self) -> int: + return float_digits(self.lot_tick_size) + def nearest_tick(self, value: float) -> float: """Return the nearest tick value based on mininum increment.