Doubt about options

Yoo guys yesterday i spent around 1.8k on options,what happened was I got a profit of 150 and I wanted to square of but it always got rejected and the market was closed I couldn’t square off and then a contract note comes that 1.8k has been deducted like grand total -1.8k wtffff like if I want to exit it says After market order yoo someone explain please