For the complete documentation index, see llms.txt. This page is also available as Markdown.

Liquidation

Learn how liquidation is triggered, and how to manage risk in your Rails account.

You can find all calculations in our Trading Metrics guide.

Liquidation is triggered when an account (in cross-margin mode) or position (in isolated margin mode) can no longer meet the minimum margin requirement. Liquidation works differently in each margin mode. Explore all concepts below:

Liquidation fees may apply; see Pricing & Fees for more information.

Isolated Margin Liquidation

Isolated margin liquidation occurs when your isolated position equity falls below the minimum maintenance margin required to support your position. At that point:

  1. The affected isolated position is immediately closed.

  2. Any remaining margin after covering losses is returned to your cross-margin balance.

Isolated Margin Liquidation Price Note

In isolated margin, the liquidation price shown is more predictable because isolated position equity is self-contained. It can still change if you add or remove margin from the position.

Cross-Margin Liquidation

Cross-margin liquidation is triggered when your cross-margin ratio reaches 100%. Rails also uses Proactive Order Cancellation and Partial Liquidation to limit worsening outcomes and protect your capital:

Liquidation Stage
Cross-Margin Ratio
Account Status

Healthy

< 90%

All orders remain active

Approaching liquidation

≥ 90% (simulated)

Liquidation Triggered

≥ 100%

Full Liquidation is triggered for small positions;

Partial Liquidation triggered for large positions

Cross-Margin Liquidation Price Note

In cross-margin mode, the liquidation price shown for any individual position is an estimate and will change dynamically because:

Proactive Order Cancellation

To reduce the risk of immediate liquidation after an order fills, Rails uses a safety feature called Proactive Order Cancellation when your Simulated Cross-Margin Ratio reaches 90%. By canceling any orders that would increase your position size, Rails protects your account from the risk of immediate post-fill liquidation.

  • Orders that fully offset or reduce an existing position, including reduce-only orders, are not canceled by this mechanism.

  • If you have multiple open orders to offset an open position, and their total quantity exceeds that of your open position, only the excess quantity is included in the order cancellation process.

  • Open orders on isolated margin positions that increase exposure are included, as that margin would be moved from the cross-margin balance into isolated position margin upon order execution, and may trigger liquidation.

Partial Liquidation

Once your cross-margin ratio reaches 100%, liquidation is triggered. Closing a large position with one market order can push execution into worse prices as the order moves through the order book. At Rails, large position thresholds are used to trigger liquidations in 20% increments to reduce the impact of slippage.

Partial liquidation lowers the total maintenance margin required because the position becomes smaller. It does not change the maintenance margin rate, which stays fixed at 5%.

Cross-Margin Liquidation Process:

  1. The liquidation engine starts closing each cross-margin position below the partial liquidation thresholds at the best available market price.

  2. For positions above the partial liquidation thresholds, the engine closes 20% of the position.

  3. After each step, the system re-calculates your cross-margin ratio.

  4. If your cross-margin ratio drops below 100%, liquidation stops and the rest of the position stays open.

  5. If your cross-margin ratio stays at 100% or higher, the engine closes another 20%.

  6. After each partial close, the engine waits a short time — currently 30 seconds — before taking the next step. This gives the order book time to recover.

  7. If your account enters liquidation again during that window, the market is moving too quickly for staged liquidation to help. In that case, the engine immediately closes the rest of the position instead of continuing in 20% steps.

  8. Any remaining funds after covering losses are returned to your balance.

Isolated positions are always liquidated in full. An isolated position uses its own dedicated margin. Closing part of it does not improve the margin health of the remaining positions.

Large Position Thresholds

The large-position threshold is set per market because order book depth differs across markets. More liquid markets such as BTC can support a higher threshold than thinner markets.

All markets use the default large-position threshold unless individually stated.

Thresholds are calibrated against live order book depth and may be adjusted over time.

Market
Large Position Threshold

Default

25,000 USDT

BTC

37,500 USDT

Avoiding Liquidation

Use the guidance below to help reduce liquidation risk in each margin mode.

To reduce liquidation risk in isolated margin mode:

  • add margin to increase isolated position equity.

  • reduce position size to lower the position’s maintenance margin requirement.

  • set a stop-loss trigger order to close the position before liquidation.

Last updated

Was this helpful?