order = Order() order.action = "BUY" order.totalQuantity = 100 order.orderType = "MKT" order.tif = "GTC" order.lmtPrice = 0.0 order.auxPrice = 0.0 contract = Contract() contract.symbol = "IBM" contract.secType = "STK" contract.currency = "USD" contract.exchange = "SMART"
order.totalQuantity = 200
self.ib.placeOrder(self.orderId, self.contract, self.order)
pip install ibapi