If a stock in your basket gets delisted or a contract associated with an order expires, Upstox automatically removes the delisted stock or expired contract from the basket. This ensures that you are not attempting to execute orders that are no longer valid due to such events.