Skip to main content

Balance settings

Balance settings define how much the strategy builder can spend and which balances to ignore.

Understanding the most important settings

Use these settings to control trade sizes and to avoid orders that fall below exchange minimums.

Trading Limit

Use this setting to 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.

Because pairs use different base currencies, set this correctly. Otherwise you can place orders for unintended amounts or place no orders at all. Set the trading limit slightly above your exchange minimum trade size.

Rounding and fees can reduce the filled amount below the trading limit. If the resulting position is below the exchange minimum, it cannot be sold without buying more units.

Min volume to sell

This setting defines the minimum trade size for the pair you trade. It is exchange- and pair-specific. When set correctly, Gunbot ignores low balances that cannot be sold.

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

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 ignores the current balance and continues looking for a buy opportunity.

When min volume to sell is set incorrectly (for example, 3), Gunbot attempts to sell the 8 USDT balance and the exchange rejects the trade.

Min volume to buy

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

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

In some cases Gunbot places a buy order in multiple parts. Min volume to buy sets the absolute minimum amount for a partial order. If you set it too low, those trades will fail.

tip

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.

Use the same denomination as for TRADING_LIMIT
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.

Use the same denomination as for TRADING_LIMIT.

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