class Option:
order_type: str
pair: str
def __init__(self, pair, order_type) -> None:
self.order_type = order_type
self.pair = pair
class Order(Option):
price: float
quantity: float
def __init__(self, pair, order_type, price, quantity) -> None:
Option.__init__(self, pair, order_type)
self.price = price
self.quantity = quantity
order = Order("btcusdt", "sell", "1", "1")
I want to get option
from order
object like.
option = order as Option
order.option