finfree-bybit-ticker/messages/Condition.py

18 lines
375 B
Python

from dataclasses import dataclass
@dataclass
class Condition:
id: str
symbol: str
condition: str
value: float
disabled: bool
fulfilled: bool
@staticmethod
def lower_than(value: float, lastPrice: float):
return value < lastPrice
@staticmethod
def greater_than(value: float, lastPrice: float):
return value < lastPrice