Fix `Symbol.tick_size_digits`, add `.price/size_tick` props

pre_overruns_ctxcancelled
Tyler Goodlet 2023-03-21 10:33:38 -04:00
parent 141af47ec0
commit c68f240376
1 changed files with 9 additions and 1 deletions

View File

@ -454,12 +454,20 @@ class Symbol(Struct):
@property @property
def tick_size_digits(self) -> int: def tick_size_digits(self) -> int:
return float_digits(self.lot_tick_size) return float_digits(self.tick_size)
@property @property
def lot_size_digits(self) -> int: def lot_size_digits(self) -> int:
return float_digits(self.lot_tick_size) 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 @property
def broker(self) -> str: def broker(self) -> str:
return list(self.broker_info.keys())[0] return list(self.broker_info.keys())[0]