Skip to main content
Adding margin is how you actively manage a position’s liquidation buffer. By moving more collateral into an isolated position, you push its liquidation price farther from the current mark price — giving it room to breathe through short-lived volatility. Removing margin does the opposite: it releases excess collateral for use elsewhere. Both features apply only to isolated margin. Cross-margin positions already share the account’s full equity as collateral; adding margin to a cross position is meaningless.

Manual add and remove

When to add

Manually adding margin makes sense when an unfavorable move has pushed your maintenance margin ratio higher than you want. For example, you are long BTC at 10× leverage, price drops, and your MMR climbs to 80%. Topping up collateral reduces effective leverage to, say, 5×, moves the liquidation price down, and buys the position time to recover.

When to remove

Removing margin is useful when a position has run deep into profit and its effective leverage has dropped far below your target. You can pull excess margin and redeploy it.

Funds flow

  • Add. Funds move from your free wallet balance into the specified isolated position’s margin. Instant.
  • Remove. Funds move from the isolated position’s margin back into free balance. Instant.

Limits

  • You cannot add more than your free wallet balance.
  • You cannot remove margin that would leave the position in danger. The post-removal isolated margin must still satisfy:
transfer_margin_required = max(initial_margin_required, 0.10 × total_position_value)
In English: after removal, the position must have at least its initial margin requirement and at least 10% of its notional. The more conservative of the two applies.

Automatic margin replenishment

Automatic margin replenishment is an opt-in feature that tops up an isolated position from free balance whenever it gets close to liquidation. It is meant to defend positions from “wick” liquidations — brief extreme moves that pierce the liquidation price and recover seconds later.

Trigger

The auto top-up fires when:
equity ≤ maintenance_margin × (1 + buffer)
The default buffer is 15%. That is: when the position has only 15% more equity than the maintenance margin requirement, the top-up kicks in.

Top-up amount

On each trigger, Intention moves initial_margin + reserved_close_fee from free balance into the position. This is enough to materially improve the liquidation buffer without dumping the whole wallet into one position. If free balance is insufficient, Intention moves whatever is available — if there is nothing left, the position proceeds into liquidation.

Multi-position coordination

If several auto-top-up positions need margin in the same block:
  • If free balance covers all of them, they are topped up in full simultaneously.
  • If free balance is insufficient, it is distributed proportionally across positions based on each one’s requested top-up.

Worked example

You have 10,000freebalanceandatakerfeeof0.0110,000 free balance and a taker fee of 0.01%. BTC is at 100,000. You open 0.4 BTC long at 10× leverage, using 4,000initialmargin.Maintenancemarginrateis0.54,000 initial margin. Maintenance margin rate is 0.5%. Reserved close fee is 3.62, leaving 5,996.38free.Liquidationpriceis5,996.38 free. Liquidation price is 90,500. BTC drops to 90,500autotopupfires.Thesystemmoves90,500 — auto top-up fires. The system moves 4,003.62 from free balance to the position. After the move:
  • Free balance: $1,992.76
  • New liquidation price: $80,489.95
BTC keeps falling and reaches the new liquidation price. Auto top-up fires again, but free balance is only 1,992.76.Thepositionreceivesallofit.Newliquidationprice:1,992.76. The position receives all of it. New liquidation price: 75,507.55. BTC keeps falling past $75,507.55. Free balance is zero; no more top-ups are possible, and the position goes through normal liquidation.

Liquidation price impact

Every time you add margin to a position, its liquidation price moves in a safer direction — down for longs, up for shorts. Every response from the margin-adjustment API includes the updated liquidation price so clients can refresh their UI immediately.
For details on the liquidation process itself, including what happens when add-margin is not enough, see Liquidations.