Sorry, here is the code :
from ib_async import *
ib = IB()
ib.connect('127.0.0.1', 7497)
ticker = '941'
ccy = 'HKD'
exchange = 'SEHK'
expiry = '20240627'
strike = 75
leg1 = Option(ticker, expiry, strike, 'C', exchange=exchange, currency=ccy)
leg2 = Option(ticker, expiry, strike, 'P', exchange=exchange, currency=ccy)
ib.qualifyContracts(leg1, leg2)
ib.sleep(4)
combo_legs = [
? ? ComboLeg(conId=leg1.conId, ratio=1, action='BUY'),
? ? ComboLeg(conId=leg2.conId, ratio=1, action='BUY')]
combo_contract = Contract(symbol=ticker, secType='BAG', currency=ccy, exchange=exchange, comboLegs=combo_legs)
order = LimitOrder('BUY', 1, 0.7)
trade = ib.placeOrder(combo_contract, order)
ib.sleep(3)
ib.disconnect()