12 lines
382 B
Python
12 lines
382 B
Python
from ib_insync import Trade
|
|
from typing import List
|
|
|
|
from .option_leg import OptionLeg
|
|
|
|
class OptionOrder:
|
|
|
|
def __init__(self, legs: List[OptionLeg], mid_price: float, order_result: Trade):
|
|
self.legs = legs
|
|
self.mid_price = mid_price
|
|
self.limit_price = abs(order_result.order.lmtPrice)
|
|
self.fill_price = abs(order_result.orderStatus.avgFillPrice) |