Broker API - Liquidate Position that is Inactive?

Only related post I saw was this, which unfortunately doesn’t work with Broker API. Any way to programmatically liquidate a client’s position in an asset? Or must we wait until the asset is again tradable?