From 6d41d7c9e40dd902d61297fc929722b19ab44536 Mon Sep 17 00:00:00 2001 From: moshferatu Date: Mon, 19 Feb 2024 12:04:48 -0800 Subject: [PATCH] Add option order type --- ibkr/option_order.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 ibkr/option_order.py diff --git a/ibkr/option_order.py b/ibkr/option_order.py new file mode 100644 index 0000000..a832ddc --- /dev/null +++ b/ibkr/option_order.py @@ -0,0 +1,7 @@ +from ib_insync import Trade + +class OptionOrder: + + def __init__(self, trade_result: Trade): + self.limit_price = trade_result.order.lmtPrice + self.fill_price = abs(trade_result.orderStatus.avgFillPrice) \ No newline at end of file