IBKR - Options assignment

Discussion in 'Interactive Brokers' started by Drawdown Addict, Sep 30, 2023.

  1. Hi all, I am about to write a bit of code to close a position on the underlying, in case I write an option and get assigned.

    Let's say I write an option and at expiration time is ITM, then I get assigned a position on the underlying.

    Is there any configuration I could change on my account to let IBKR close that position immediately?

    My initial idea was to write a watcher on the account, and at the expiration time check if there is anything on the underlying and close it. Am I overcomplicating it?
     
  2. newwurldmn

    newwurldmn

    I think this can get hairy.
    But I don’t know your book.
     
  3. kpwn

    kpwn

    Make sure you know the difference between American & European Options assignments before you model anything. -kPwn
     
  4. There are enough funds to cover positions in the underlying at all times.
     
  5. Read the question again.
     
  6. kpwn

    kpwn

    So, IB doesn't send you a notification if you get assigned?
     
  7. You can use conditional orders on IKBR (trade station) based on the price of the underlying. So set it to close if the price tags the short leg. That won't protect you after close or pre market, and assignment can happen early as well. I would just trade cash settled options like indexes.
     
    Drawdown Addict likes this.
  8. That is a good answer sir. I haven't used conditional orders for anything, but they make sense for this.

    Thank you.
     
  9. The only solution is to check your portfolio every [time interval] for a position in stock/ future xyz and if position is > x --> create a market order. Other then that you have no trigger you can work with as the event "getting assigned" is not something the API supports, besides a time delayed notification you could read. But due to the delay you would be liquidated before you can react.
     
    #10     Oct 1, 2023