Skip to main content

Balance settings

Balance settings define how much the bot can spend, in a strategy made with the strategy builder.

Understanding the most important settings

Understanding balance settings is crucial for any trading strategy. These settings play a vital role in determining the balance between risk and reward, and can significantly impact the success of your trades. It's important to familiarize yourself with these settings and understand how they work.

Trading Limit

With this setting you tell Gunbot how much to spend on a buy order.

The trading limit is generally defined in the "base currency" of a pair. This means that if you want to buy LTC with BTC, the trading limit must be set in Bitcoin. If you want to buy BTC with USD, you need to set the trading limit as an amount in US dollars.

Since in crypto there are many different base currencies, it is very important you set this correctly. Not setting it correctly can lead to trades for unwanted amounts, or no trades at all. It is important to set the trading limit at least a bit higher than the minimum trade size of your exchange.

The reason for this is that due to rounding and/or fees a trade mostly results in an amount worth slightly less than the trading limit. If this amount is lower than the minimum trade size of your exchange, it cannot be sold without buying additional units.

Min volume to sell

This setting defines the minimum trade size for the pair you trade, this is both pair and exchange specific. When set correctly, Gunbot will ignore low balances that can not be sold.

Look up the minimum trade size for your pair, and set it exactly like this.

Usage example:

  • Trading pair: USDT-BTC
  • Exchange defined minimum trade size: 10 USDT
  • Current balance value: 8 USDT

When min volume to sell is correctly set to 10, Gunbot will ignore the current balance and proceed with looking for a buy opportunity.

When min volume to sell is set incorrectly, for example to 3, Gunbot will attempt to sell the current balance worth only 8 USDT. This will fail because the exchange does not allow the trade.

Min volume to buy

This setting is very similar to min volume to sell, it defines what the minimum amount is that Gunbot can place a buy order for.

Look up the minimum trade size for your pair, and set it exactly like this. It is normal to set this parameter exactly the same as min volume to sell.

In some cases Gunbot will place a buy order in multiple parts, the setting min volume to buy tells the bot what the absolute minimum amount for a partial order can be. If you set it too low, such trades will fail.


Min volume to buy is only needed when using limit orders.

Balance settings parameters

LabelConfig ParameterDefault ValueDetailed Description
Trading limitTRADING_LIMIT20Sets the maximum amount in base currency for each buy order. Ensure this is higher than the MIN_VOLUME_TO_BUY and MIN_VOLUME_TO_SELL to prevent order rejections.

For example, if trading BTC-x pairs, a typical setting might be 0.1 BTC. For fiat pairs like USD-x, a value such as 100 may be appropriate.
Trading limit pctTL_PERC0Enables setting the investment per buy order as a percentage of the available base currency balance. If set to a value greater than 0%, such as 10%, it overrides the TRADING_LIMIT.

For instance, with 1 BTC available, a setting of 10% would execute a buy order of 0.1 BTC.
Trading limit all-inTL_ALLINfalseWhen set to true, commits all available base currency balance to each buy order, disregarding other limits like TRADING_LIMIT or TL_PERC.
Max invested baseMAX_INVESTMENT999999999999999This parameter caps the total investment in base currency. For example, setting it to 1000 USDT in a USDT-BTC trading pair would limit the maximum investment to 1000 USDT.
Funds reserveFUNDS_RESERVE0Reserves a specified amount of base currency that won't be used for trading.

It’s recommended to maintain the same reserve amount for all trading pairs with the same base to ensure predictable trading behavior. For instance, reserving 0.5 BTC in BTC-x pairs keeps 0.5 BTC unutilized.
Keep quoteKEEP_QUOTE0Specifies a minimum amount of quote currency to remain unsold.

For instance, setting it to 0.01 in a BTC-USD pair ensures that 0.01 BTC is always retained. Ensure MIN_VOLUME_TO_SELL is set higher than the quote held back to allow continued trading.
Min volume to buyMIN_VOLUME_TO_BUY10Sets the minimum notional order value for buy orders. It is critical to align this value with your exchange's minimum trade requirements to avoid order rejections.

For example, if your exchange has a minimum trade value of $10, set this parameter accordingly to ensure valid orders.
Min volume to sellMIN_VOLUME_TO_SELL10Sets the minimum notional order value for sell orders. Like the buy setting, this should be aligned with the exchange's minimum trade requirements to ensure orders are valid and executable.

If the exchange minimum is $10, this should be set to at least $10.

Overview of effects on different order types

Config ParameterAffected Order TypesNot Affected Order Types
Trading LimitStrategy buyStrategy sell, RT buy, RT buyback, RT sell, Close, DCA buy, Stop limit
Trading Limit PercentageStrategy buyStrategy sell, RT buy, RT buyback, RT sell, Close, DCA buy, Stop limit
Trading Limit All-InStrategy buyStrategy sell, RT buy, RT buyback, RT sell, Close, DCA buy, Stop limit
Keep QuoteN/AN/A
Funds ReserveN/AN/A
Min Volume To BuyStrategy buy, DCA buy, RT buy, RT buybackStrategy sell, RT sell, RT buyback, Close, Stop limit
Min Volume To SellStrategy sell, Stop limit, RT sellStrategy buy, RT buy, RT buyback, Close, DCA buy