How can I submit a pending order using ibapi that can be executed after hours as well?

101 Views Asked by At

I use Python to access abiapi..

   order = Order()
   
    order.action = "BUY"  # or "SELL" 
    order.action = "SELL"
    order.totalQuantity = quantity  # the quantity of the asset to buy/sell
    order.orderType = "LMT"  # the order type, such as "LMT" for limit order
    order.tif = "GTC"
    order.eTradeOnly = False
    order.firmQuoteOnly = False
    order.lmtPrice = limitprice

What do I need to change so that the order is executed anytime even after hours?

"Outside rth" order...

1

There are 1 best solutions below

0
dno On

See OutsideRth at https://interactivebrokers.github.io/tws-api/classIBApi_1_1Order.html

You all but had it.

order.outsideRth = true