Do you think it would be possible to use IBALGO to transmit a BAG order through the API? Essentially, leveraging IB's IBALGO in my own API code specifically for option spreads
No. You can’t trick IB to do something that was never programmed to work with options. And what you described does not even need to be an algo but an order type. What you need is Walk Limit order type which is supported only by, and probably patented by Schwab. Though some order execution tech companies may also support equivalent orders.
Though actually, if you can place orders via IB’s API, then you can also modify them. So you could simply adjust the price via the API every X seconds or minutes, thus implementing your own variant of whatever algo you’d imagine.
I've communicated with IB support many times trying to determine if/when they'll extend algo support for BAG orders ... from either the UI or API. Their response ... "you can submit an enhancement request if you'd like". Yeah ... thanks.
I just hired a coder on upwork to build an algo for me - one of the requests was to try to use IBALGO to manage the pricing on spread orders. We'll know by next week whether he could deliver that. I will share code if it works
Be very careful not to exceed 390 orders on average per day each month or you will lose priority customer status and pay higher option exchange fees. https://www.cboe.com/publish/RegCir/RG16-064.pdf
My upwork coder provided the following: ************** ib_order = LimitOrder('BUY', 1, 0.25, algoStrategy='Adaptive', algoParams=[TagValue('adaptivePriority', 'Patient')]) trade = ib.placeOrder(spread_contract, ib_order) **************** That will place an order for 1 spread at $0.25 limit price (you would have to create your own option spread strategy defined as 'spread_contract' My worry is I think that 0.25 price just hits the exchange as a limit order and not as an IBALGO order. I don't know how to test this though. From pic below it seems like it's going in as a limit order. Anyone know how to test if it's a limit order or IBALGO order? Thanks
You can't use IBALGO for BAG orders. We instead used SNAP to PRIM. See my code here: https://www.elitetrader.com/et/thre...e-for-option-spread-why-is-it-so-slow.342016/