diff --git a/ibkr/client.py b/ibkr/client.py index 0231673..81dec18 100644 --- a/ibkr/client.py +++ b/ibkr/client.py @@ -79,6 +79,20 @@ class Client: self.ib.qualifyContracts(option_contract) return option_contract + def submit_option_order(self, leg: OptionLeg, quantity: int): + option_contract = self.get_option_contract(leg) + contract = Contract() + contract.conId = option_contract.conId + contract.exchange = SMART + + order = Order() + order.action = BUY + order.orderType = 'MKT' # TODO: Support limit orders. + order.totalQuantity = quantity + order.transmit = True + + return self.ib.placeOrder(contract, order) + def submit_combo_option_order(self, legs: List[OptionLeg], quantity: int) -> Trade: combo_legs = [] for leg in legs: