Are you receiving a "Stopped symbols...(instruments_stopped_trading)" error when trying to close a cash-settled index option position, such as SPX, NDX, VIX, etc.? Unlike most traditional equity options that allow you trade up to the listed expiration date, cash-settled indexes have specific last trading days along with a particular settlement method. For example, a monthly SPX option has an expiration date on the third Friday of every month. That said, the last trading day for monthly cash-settled index options is Thursday and not the expiration date listed. The settlement value is determined on Friday morning by the amount of the symbol SET. SET is usually published 15-20 minutes after market open.
If you were looking to close a monthly SPX position (or any other European-style index option) on expiration day, or the third Friday, you would not be able to, since it would already be expired. You can learn more about cash-settled indices, including their last trading date and settlement symbol, by clicking here.