IB algo for option combos ?

Discussion in 'Interactive Brokers' started by zdave83, Nov 11, 2019.

  1. yosuji198

    yosuji198

    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
     
    #11     Mar 7, 2020
  2. guru

    guru


    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.
     
    #12     Mar 8, 2020
  3. guru

    guru

    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.
     
    #13     Mar 8, 2020
  4. zdave83

    zdave83

    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.
     
    #14     Mar 8, 2020
  5. yosuji198

    yosuji198

    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
     
    #15     Mar 8, 2020
    zdave83 likes this.
  6. zdave83

    zdave83

    Many thanks !
     
    #16     Mar 8, 2020
  7. Robert Morse

    Robert Morse Sponsor

    #17     Mar 8, 2020
  8. yosuji198

    yosuji198

    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

    upload_2020-3-18_12-9-0.png
     
    #18     Mar 18, 2020
  9. yosuji198

    yosuji198

    #19     Mar 21, 2020
  10. zdave83

    zdave83

    #20     Mar 21, 2020