"Position liquidated". What balance to keep on an exchange for several futures bots
Published on:
Reading time:
Author : Veles Team

"Position liquidated". What balance to keep on an exchange for several futures bots

Let’s say you decided to launch bots on Bybit to build up trading volume. You found four suitable bots. In the backtest over one month, from August 20 to September 21, 2026, all of them show good volume, good profit, and not a single losing trade.

BotVolume per monthProfit per monthBacktest
XMR Long Bybit Contest13 353 USDT+50 USDTopen
HNT Long Uni Classic9 531 USDT+136 USDTopen
ASTER Long ROC Classic11 446 USDT+32 USDTopen
NEAR Long Bybit Contest5 656 USDT+34 USDTopen
Total~ 40 000 USDT+252 USDT

All four bots trade long with x5 leverage and cross margin. You allocate a deposit of 100 USDT to each bot. So you need to keep 400 USDT on the exchange, right?


Is 400 USDT enough?

No — and here’s why. All four bots trade with a grid of orders: when the price drops, the bot doesn’t close the trade at a loss but buys more of the coin cheaper and waits for the price to return. Until then, the position is in the red. Such a loss is called floating: it hasn’t been realized yet and changes along with the price.

Floating loss interferes with the bots for two reasons.

  1. The bot’s deposit is frozen. The bot’s deposit is split among the grid orders. For each order, the exchange freezes collateral — the initial margin. With x5 leverage, the collateral equals a fifth of the purchase: for a 50 USDT order, the exchange freezes 10 USDT. Together, the collateral of all grid orders equals the bot’s deposit, 100 USDT. For four bots, 400 USDT is frozen — the entire balance.

  2. The loss is deducted from the same balance. With cross margin, each bot’s floating loss is deducted from the total balance on the exchange. When the balance, accounting for the loss, drops below the initial margin, Bybit stops accepting new orders. A bot that closed a trade won’t be able to open a new one, and XMR, which places orders on an indicator signal, won’t be able to buy more during a drawdown. At a balance of exactly 400 USDT, this will happen at the very first floating loss.

That’s why, in addition to the 400 USDT of collateral for orders, the balance needs a reserve for drawdowns. Its size is shown by MAE — maximum unrealized loss. This metric is in the results of every Veles backtest: it shows how many USDT the bot’s position went into the red at the worst moment.

The MAE metric in a Veles backtest already accounts for leverage — there’s no need to multiply it separately.

BotMAE per month
XMR−19.3 USDT
HNT−27.1 USDT
ASTER−27.9 USDT
NEAR−9.1 USDT
Total−83.4 USDT

If all four bots end up in their worst drawdown of the month at the same time, the loss will amount to 83.4 USDT. Together with the collateral for orders — ~485 USDT. So, judging by the one-month backtest, 500 USDT is enough with a margin to spare. Right?


Is 500 USDT enough?

No. During the month of the backtest, the market never dropped sharply. To account for crashes, we ran backtests of the same bots with the same settings over one year — from September 22, 2025 to September 21, 2026.

The strongest crash of that year occurred on October 10, 2025. On that day, U.S. President Donald Trump announced 100% tariffs on goods from China, and, according to CoinDesk, over 24 hours exchanges forcibly closed traders’ positions worth about $19 billion.

But deep drawdowns happened in other months too: HNT’s worst drawdown came on a trade from January 15 to February 14, 2026.

So for the calculation we take each bot’s worst drawdown over the year, whenever it happened.

BotMAE per yearYearly backtest
NEAR−201.2 USDTopen
HNT−174.5 USDTopen
ASTER−154.4 USDTopen
XMR−75.5 USDTopen
Total−605.5 USDT

The sum of the worst drawdowns over the year is 605.5 USDT. But even this amount won’t be enough on the balance. To it, you need to add maintenance margin and funding.

  • Maintenance margin. This is the minimum amount the exchange requires you to keep under open positions. If the balance, accounting for the loss, drops to it, Bybit will forcibly close all positions. This is called liquidation.

The rate depends on the coin: for NEAR — 0.67% of the position value, for XMR and ASTER — 1%, for HNT — 4%.

  • Funding. While a trade on a perpetual futures contract is open, the exchange deducts a small fee from the balance several times a day — funding. Usually this is 0.01% of the position value every 8 hours. The Veles backtest does not account for this fee.

For calculating the balance, what matters is the funding on each bot’s worst trade: while a position is in a drawdown, the fee is deducted from the same balance as the loss. On other trades, funding is covered by their profit.

How we calculated:

  1. On the “Trades” tab in the backtest, we found each bot’s worst trade: how long it lasted and for what amount the bot bought coins.
  2. On the Bybit website, in the “Funding Rate” section, we looked at what rates were in effect on those days.
  3. We multiplied the purchase amount by the rates over the duration of the trade.

HNT’s worst trade lasted 30 days. During that time, the exchange deducted funding 90 times, almost always at 0.01% — a total of ~0.9% of a 556 USDT position, that is up to 5 USDT. NEAR’s, ASTER’s, and XMR’s worst trades lasted less than a day, and funding for them did not exceed 1 USDT.

What the balance is made up ofAmount
Sum of worst drawdowns over the year605 USDT
Maintenance margin~30 USDT
Fundingup to 5 USDT
Minimum so the exchange doesn’t liquidate positions~650 USDT
Collateral for bots’ orders400 USDT
Balance at which bots trade as in the backtest~1040 USDT

For bots with cross margin and no stop-loss, the Veles help center has a simpler rule: the sum of the MAE of all bots should be no more than half the balance. That is, multiply the sum of the MAE by 2.

605 × 2 ≈ 1200 USDT

Half of the balance goes toward covering drawdowns, the other half covers the collateral for orders, maintenance margin, and funding. The remaining ~160 USDT is a reserve in case the next crash turns out to be deeper than in the backtest.

It turns out that for four bots with a deposit of 100 USDT each, you need to keep ~1200 USDT on the exchange — 3 times more than the 400 USDT we started with.


How to calculate the exchange balance for your own bots

  1. Run a backtest of each bot over at least a year. Set the same dates for all bots. The period should include a sharp market crash, for example October 10–11, 2025.
  2. Add up the MAE of all bots in USDT. Altcoins usually fall together, so drawdowns of different bots often coincide in time.
  3. Add maintenance margin and funding. Bybit publishes the maintenance margin rate for each coin in the “Margin Data” section. Funding matters if the worst drawdown lasted for weeks. This gives you the minimum at which the exchange won’t liquidate positions.
  4. Add the collateral for orders — the sum of all bots’ deposits. With such a balance, the exchange will accept all grid orders even during a drawdown.
  5. Check against the Veles rule. The sum of the MAE of all bots should be no more than half the balance. If the calculation from steps 2–4 gave less than double the sum of the MAE, keep double the sum of the MAE on the exchange.

A 100% win rate in a backtest does not mean the bot can’t lose money. The bot doesn’t realize a loss as long as there’s enough money on the balance to hold the position. If the reserve runs short, the exchange will close the positions, and almost the entire balance will be lost.

This material is for informational purposes only and does not constitute individual investment advice. Bot results on historical data do not guarantee similar returns in the future. Trading cryptocurrency and futures involves a high risk of capital loss.

gift box