Interfund transfers between Securities and Commodities are not allowed on Upstox. You will have to withdraw the funds and need to deposit them again in the correct segment.

However, keep in mind that you can’t withdraw on the same day. You’ll have to wait for  T+1 (trading + 1) day or T+2 (trading + 2) days to transfer funds from one segment to another.