The margin for a position is the amount of funds from your balance that are tied to the position. Margin is not deducted from your balance, but the margin amount is nonetheless not available for opening other positions. All the funds used to open the position are borrowed funds. It might be helpful to think of margin as a kind of collateral, set aside from your balance for the loan. However, keep in mind that your loss on the position can be larger than the margin. If you open a $5,000 long position in XBT/USD with 5:1 leverage, your margin for the position is $1,000. But if you later close this position for $3,000, you have lost $2,000 - twice as much as the margin.