When you decide to close an open position, you can either use the "claim" button (a Market Margin Buy or Sell order will close a long or short position, respectively), or place a Limit Margin Buy or Short (the opposite of your open position) order of the same amount as your open position. When the order is completely filled, the position is closed, borrowed funds are repaid, and profit/loss will be credited to your margin wallet balance. You can partially close a position, also known as "reducing" your position.
Basics Steps to Closing a Position:
It’s possible to set a take profit level on an open long position of say 10 BTC (bought 10 BTC) by placing a Limit Margin Sell order at any price above your initial buy-in price. If you longed 10 BTC at $1,000, then you could place a Limit Margin Sell of 10 BTC at $1,100 to close the position if the market were to reach and fulfill that order.
If you would like to set multiple take profit levels, then you could place multiple Limit Margin Sell orders that partially close the open position; e.g., a Limit Margin Sell order of 1 BTC at $1,050, another Limit Margin Sell order of 5 BTC at $1,075, and a final Limit Margin Sell order of 4 BTC at $1,100. Your position would be fully closed if all 3 Limit Margin Sell orders were fulfilled by market action.
Closing a position occurs based on the borrowed funding’s interest rate. A position using funding at the highest rate is closed first.