Skip to content

How to Calculate Leverage

Leverage Definition in the Bot

Leverage in the bot is defined as the ratio of the maximum position size to your deposit.

Formula:

Leverage = (Order Size × Max Trigger Number) / Deposit

Calculation Example

Suppose your deposit is $1,000, and you set the following bot parameters:

  • Order Size = $10
  • Max Trigger Number = 500

Calculation:

Leverage = (10 × 500) / 1,000 = 5

This means that with these parameters, the bot can build a position 5 times larger than your deposit, which corresponds to 5x leverage.

Setting Leverage on the Exchange

The leverage set in the exchange terminal defines the maximum leverage for a specific trading pair.

This acts as protection against the bot building a larger position through the exchange than you intended.

The exchange allows you to open positions larger than your deposit by using borrowed funds. For example, with 20x leverage and a 1,000 USDT deposit, you can open a position of up to 20,000 USDT.

Connection with the Bot

The leverage on the exchange must be equal to or greater than the calculated leverage of the bot.

If the leverage set on the exchange is lower, the bot will stop while building the position and switch to Disable IN status due to insufficient margin.

Examples of Used Margin

Example 1: Exchange leverage x20

Settings:

  • Deposit: 1,000 USDT
  • Order Size: 10 USDT
  • Max Trigger Number: 500

Result:

  • Maximum bot position: 5,000 USDT
  • Used margin at full position size: 5,000 / 20 = 250 USDT
  • Free margin: 1,000 − 250 = 750 USDT

Example 2: Exchange leverage x100

Settings:

  • Deposit: 1,000 USDT
  • Order Size: 10 USDT
  • Max Trigger Number: 500

Result:

  • Maximum bot position: 5,000 USDT
  • Used margin at full position size: 5,000 / 100 = 50 USDT
  • Free margin: 1,000 − 50 = 950 USDT

Limiting Leverage on the Exchange

You can always limit leverage in the exchange terminal as a way to protect yourself from configuration mistakes.

If your bot settings are designed to use higher leverage than the leverage set on the exchange, the bot will reach the exchange limit while building the position. In this case, it will not be able to open the expected position size and will switch to Disable IN status.

This means that the leverage limit set on the exchange acts as an additional safety layer. It can help prevent an unwanted or excessively large position if you are not fully confident in the bot settings.

To receive timely notifications about such situations, when the bot stops due to insufficient margin, for example after reaching the leverage limit set on the exchange, we recommend connecting notifications through the Telegram bot. This will allow you to react quickly and make the necessary adjustments.