Home › Guides › Crypto Liquidation

WHY BOTS FAILFREENO ACCOUNTAUTOMATED TRADE BOTSCrypto LiquidationThe arithmetic of how bots failEDUCATION ONLY | NO SIGNALSEXAMPLE NUMBERS ARE LABELLEDAUTOMATED TRADE BOTSautomatedtradebots.com
A free page on crypto liquidation. Education only, with example numbers labelled.
WHY BOTS FAIL

Crypto Liquidation

Short answer

A leveraged position is held with a small deposit, called margin. If losses use up the margin down to a minimum level, the exchange closes the position itself. That forced close is liquidation.

Crypto liquidation is when an exchange closes a leveraged position by force because the margin no longer covers its losses. This page shows the arithmetic, and how a bot that keeps adding positions walks into it.

The page explains the idea in plain words, works through the arithmetic with a table, and shows how it hits grid, martingale and DCA bots, then tells you what to check before you run one.

  • A worked example with real arithmetic
  • How it hits grid, martingale and DCA bots
  • How to check for it before you run a bot
  • No advice, no signals, no profit promises

Last reviewed 28 October 2026. Education only, not advice.

Free, no account Runs in your browser Worked numbers shown Not advice Examples labelled

Ready to go further

Next: work out a liquidation price

Enter an entry price, leverage and maintenance rate to see where a position would be closed and how far that is from entry.

Reading time7 minutes
Worked exampleExact arithmetic
Tools linked2 on this page
Reviewed28 Oct 2026

What is included

  • What it is, in plain words
  • The formula or mechanism, with exact arithmetic
  • How it hits grid, martingale and DCA bots
  • A check you can run before you switch a bot on

Who it is for

  • People who run or plan to run a trading bot
  • Anyone reading a backtest or a bot sales page
  • Readers who want the numbers, not the pitch
  • Not advice, and not a signal service
Fall from entry that triggers liquidation, by leverage (made-up simplified model)49.5%2xleverage19.5%5xleverage9.5%10xleverage4.5%20xleverage1.5%50xleverageLong position, maintenance rate 0.5 percent, fall = 1/leverage minus 0.005. Made-up simplified formula. Calculated by us on 29 Oct 2026,exact.
The picture for this page. Example numbers are made up unless the page says they were calculated.

Key facts

  • A leveraged position is held with a small deposit, called margin. If losses use up the margin down to a minimum level, the exchange closes the position itself. That forced close is liquidation.
  • The minimum level is the maintenance margin. It is a share of the position value, and the share, the way it is worked out and the fees taken all vary by venue. Check the exact rules of yours.
  • In a made-up simplified model with a 0.5 percent maintenance rate, a long position at 10x is liquidated after a fall of about 9.5 percent from entry, and at 50x after about 1.5 percent (calculated by us on 29 Oct 2026, exact for the model).
  • Higher leverage does not change what the market does. It moves the forced close closer to the entry price.
  • A bot that adds positions as price falls raises its position and lowers its average entry, so its liquidation price climbs toward the market. In the made-up ladder below it reaches 80.40 while holding 80 units.

What liquidation is

Leverage means controlling a position larger than the money you put up. You deposit margin, which acts as a security deposit, and the exchange lends the rest of the exposure. If the price moves your way, the profit is on the whole position. If it moves against you, the loss is on the whole position too, and it comes out of your margin.

The exchange cannot let your loss grow past the margin, because then the exchange itself would be owed money. So it sets a floor. When your remaining equity (margin plus unrealised profit or loss) falls to that floor, the exchange closes the position at once, whatever you intended. You are not asked. That is liquidation. It is the crypto-venue version of a stop out, which the guide on margin calls explains for brokers.

After a liquidation you usually lose the margin that backed the position, and a fee can be taken as well. Some venues keep an insurance fund for gaps, some share the loss, and a few let an account go below zero. The rules differ by venue, so this page can only show the general mechanism.

Maintenance margin in general terms

There are two margin figures to know. Initial margin is the deposit needed to open the position, equal to position value divided by leverage. Maintenance margin is the smaller amount that must stay in the account to keep the position open, usually written as a percentage of the position value. When equity falls to the maintenance margin, the position is closed.

The percentage often changes with position size: bigger positions can face higher rates. Many venues also use a "mark price", a smoothed price, to decide liquidation, so a brief spike on the last traded price may not trigger it. Some take a liquidation fee. In this page, one flat rate of 0.5 percent is used so the arithmetic is clear. It is made up, and a real figure may be higher or lower.

Simplified long liquidation price = entry x (1 - 1 / leverage + maintenance rate)

For your own numbers use the liquidation price calculator. For a short position the move is the other way: the formula becomes entry x (1 + 1 / leverage - maintenance rate).

A worked example: one position

This is a made-up example. A long position is opened at an entry price of 100 with a maintenance rate of 0.5 percent. The table shows the simplified liquidation price at five leverage settings.

LeverageInitial margin per 1,000 of positionLiquidation priceFall from entry that triggers it
2x500.0050.5049.5%
5x200.0080.5019.5%
10x100.0090.509.5%
20x50.0095.504.5%
50x20.0098.501.5%

At 2x the price has to fall by nearly half. At 10x a fall of 9.5 percent ends the position, and a move that size is well within what a volatile asset can do. At 50x a fall of 1.5 percent does it, which a volatile asset can cover within a day. Nothing about the asset is different across the five rows. Only the size of the position against the margin changed. Calculated by us on 29 Oct 2026, exact for the simplified model.

How bots with many levels walk into it

A single position has one liquidation price. A bot with many levels, such as a grid, a DCA bot or a recovery ladder, keeps buying as price falls. Each purchase does two things at once. It raises the position, so a given fall now costs more. And the margin behind it, if it is a fixed amount, stays the same. The liquidation price therefore climbs toward the market with every rung, so the price runs down while the line comes up to meet it.

A made-up ladder: the bot buys 20 units at each of 100, 95, 90, 85, 80, 75 and 70, with an isolated margin of 1,000 and the same 0.5 percent maintenance rate. For an isolated position of u units with total cost C, the simplified liquidation price is (C - margin) / (u x (1 - 0.005)).

Rung filledUnits heldAverage entryPosition value at entryPosition as a multiple of marginLiquidation pricePrice at or below it?
10020100.002,0002.00x50.25No
954097.503,9003.90x72.86No
906095.005,7005.70x78.73No
858092.507,4007.40x80.40No
8010090.009,0009.00x80.40Yes
7512087.5010,50010.50x79.56Yes
7014085.0011,90011.90x78.25Yes

After the 85 rung fills the bot holds 80 units at an average of 92.50, with a liquidation price of 80.40. The next rung is at 80, which is below that. So the position is closed at about 80.40, on the way down, before the 80 order can fill. The bot had seven rungs planned down to 70 and was force-closed after four. At the first rung the position is only 2 times the margin and the liquidation price is far away, 50.25. It is the filling of the rungs that moves it. Calculated by us on 29 Oct 2026, exact for the simplified model.

A buy ladder: price at each fill against the liquidation price (made-up)5060708090100100959085807570liquidation 80.40 holding 80 unitsFill price of each rung (grey: price, red dashed: liquidation price after that fill)Made-up ladder: 20 units per rung, 1,000 margin, isolated, maintenance rate 0.5 percent. Calculated by us on 29 Oct 2026, exact for thissimplified model.
The price steps down the ladder while the liquidation price rises. They cross between the 85 and 80 rungs.

How it hits each bot type

  • Grid bots on futures buy lower rungs as price falls. See futures grid liquidation for a grid with a fixed range and the check against its lower bound.
  • DCA bots that add on dips do the same with bigger steps. Leverage turns an averaging plan into a forced exit.
  • Martingale ladders double the size at each step, so the line climbs fastest of all.
  • Auto-added margin, where a bot tops up the position, moves the line away but spends more of the account. It is a delay, not a fix.

How to check before running a bot

  1. Add up the position if every rung fills. Not the position now: the position at the last rung.
  2. Find the liquidation price for that full position in your venue's own display, or with the calculator as a rough guide only.
  3. Compare it with the lowest price the bot plans to trade. If the liquidation price is higher, the bot cannot reach its own lowest rung.
  4. Measure the gap in percent, and compare it with the ordinary daily and weekly moves of the asset.
  5. Read the venue's rules on margin mode, maintenance tiers, fees and the price used to trigger liquidation. They differ, and the figure on the screen beats any formula on a web page.
The formulas on this page are simplified and the numbers are made up. Real venues apply their own maintenance tiers, fees and trigger prices. Rules vary by venue, so read yours.

What it does not tell you

A liquidation price shows where a forced close happens if price moves slowly and the rules are as assumed. Fast moves can gap past it, so the close happens at a worse price than the line. It also says nothing about whether the trade was a good idea before it was closed. Equally, staying above liquidation does not make a position safe: a loss of 40 percent of the margin is a heavy loss with no liquidation at all.

FAQ

Frequently Asked Questions

What does liquidation mean in crypto?

It means the exchange closes your leveraged position by force because your margin no longer covers the losses. You are not asked, and you usually lose the margin that backed the position.

What is maintenance margin?

The smallest amount of equity that must remain to keep a leveraged position open, usually a percentage of the position value. When equity falls to it, the position is liquidated. The percentage varies by venue and often by position size.

Is the liquidation price the same on every exchange?

No. Margin mode, maintenance tiers, fees and the price used for the trigger all vary by venue. The formula on this page is a simplified guide, so use the figure your venue shows.

Can I be liquidated with low leverage?

It takes a much bigger fall. In the made-up model, 2x needs a fall of about 49.5 percent. But a bot that keeps adding positions raises its effective leverage as it goes, so a low starting leverage does not stay low.

Does adding margin prevent liquidation?

It moves the liquidation price further from the market, at the cost of more money at risk. It delays the problem and does not remove the loss on the position.

Are the numbers on this page real?

Example numbers are made up to show how the maths works, and the page says so. A figure only counts as exact when the page says it was calculated on a stated date. Nothing you enter in a calculator leaves your browser.

Can I use this to decide whether to run a bot?

It can show whether a bot's numbers hold together and how much an account can lose. It cannot say what the market will do, and it is not advice. Use it to ask better questions, then read the terms of your own broker or exchange.

Is this financial advice?

No. It explains a mechanism in general terms with made-up numbers. Check the rules of your own venue.

Know the Risk Before You Run It

Free calculators and guides, added every week. Leave your details and we will email you when new ones go up.

Trading carries a risk of loss