Guides Bybit Trading Bot

What Is Bybit Trading Bot?

Beginner
Bybit Trading Bot
Oct 20, 2022

Crypto trading bots are automated computer programs that can help you buy low and sell high — place buy and sell orders at predetermined intervals within a predefined price range — automatically to capitalize on price fluctuations, especially in a volatile 24/7 crypto market. But how does it work actually and can you really profit more substantially using a grid bot? Here's what you need to know about Bybit's Grid Bots.

How Do Bybit Grid Bots Work?

You can set a series of buy and sell orders in either price direction, creating a trading grid of orders waiting to be triggered. When the price hits your preset target, a buy order will be executed, and a sell order will be placed above on the next grid. When the price rises again to the next grid, the sell order will be executed, allowing you to profit from the price difference.

Whether you prefer owning the underlying and taking advantage of the volatility with the Spot market or dabbling with derivatives for increased leverage with the Futures market, Bybit has you covered with our Spot and Futures Grid Bots that will help take the emotions out of your trades and automate the tedious process of manually placing orders.

Grid Bot Example

Suppose Trader A creates a Spot Grid Bot with the following parameters:

  • Spot pair: BTC/USDT

  • Market price: 54,000 USDT 

  • Upper price: 65,000 USDT

  • Lower price: 45,000 USDT 

  • Number of grids: 5

  • Intervals: 4,000

  • Total investment: 23,610 USDT

The system will calculate the actual amount in base token required to place an order and then automatically buy the corresponding amount of base token needed for the grid trading strategy by placing market orders.

When the grid trading strategy is successfully activated, the orders will be placed as follows:

Price (USDT)

Order Type

65,000

Sell

61,000

Sell

57,000

No initial orders will be placed

Market price: 54,000 USDT 

53,000

Buy

49,000 

Buy

45,000

Buy

Scenario One: In a Volatile Market

When the BTC price hits 53,000 USDT, the buy order will be executed, and the sell order at 57,000 USDT will be placed above the next grid. When the price rises to 57,000 USDT, the sell order will be executed, and a buy order at 53,000 USDT will be placed — that is, a grid trade is now completed and profits are made from the price difference.

Scenario Two: In a One-Sided Market

When the BTC price rises to 57,000 USDT, no buy/sell orders will be triggered. In a one-sided market, the BTC price rises to 61,000 USDT, which will trigger a sell order and place a buy order at 57,000 USDT. 

If the price continues to rise and reaches 65,000 USDT, a sell order will be placed at 65,000 USDT, and a buy order placed at 61,000 USDT.

Your grid bot will only operate in the upper and lower price bounds that have been configured. When the BTC price rises above 65,000 USDT or falls below 45,000 USDT, the strategy will be suspended and no new orders will be placed by the grid bot.

If the market price falls outside of the price range, you can choose either to close the grid trading strategy to get the most out of your funds or wait for the price to return to the range you’ve set, at which time the strategy will resume.

Notes:

— Entry orders will be bought at the market price to ensure the successful execution of the grid strategy.

— Grid trading will be channeled directly through your Bybit Spot Account and Trading Bot Account.

Create Your Grid Bot

Grid trading is available for both desktop platform and app versions.

Here’s a step-by-step guide to help you create your first grid bot on Bybit.

Step 1: Please click on Trade –> Trading Bot in the navigation bar to enter the Bybit Grid Bots page. 

bybit homepage trading bot

Step 2: Click on Create to begin the Grid Bot creation process.

bybit trading bots

Step 3: For this specific example, we'll be showcasing how you can create a Spot Grid Bot.

a. Create your grid bot with the following parameters:

  1. Pair: Select spot pair
  2. Price Range: Set lower and upper price bounds
  3. Number of Grids: Enter the number of grids
  4. Total Investment: Enter the amount to invest

b. You can click on Auto Fill to automatically enter intelligent parameter suggestions in your parameter settings. The recommended settings for AI parameters will be based on the historical data of the coin.

Then, click on Create.

Please note that the higher the number of grids, the smaller the price intervals. This also means that your orders may be filled more frequently in a volatile market. However, your profits would be lower due to the multiple trading fees.

Step 4: Please double-check the grid bot information you've created, and then click on Create to start trading.

Your grid bot has been successfully created!

View Your Active/History Grid Bots

After you click on Create, the page will automatically redirect to My Grid Bots for you to view your active grid bots.

You can click on Details in the upper right corner of the grid bot to enter the Details page. More information about your active grid bots, including Total Profit (USDT), Grid Profit (USDT), Total APR, and more, can be checked under Grid Profit.

If you want to view your trading history, click on History to explore more details.

Grid Profit and Total P&L Calculation

It’s important for you to understand how to calculate the profit of a grid trading strategy before creating your grid bot. The following is a guide to help you better understand the relationship between the different variables and the calculation of grid profit and total profit and loss.

Let's run an example to see how to calculate Grid Profit and Total P&L.

Suppose Trader A creates a grid trading strategy based on the following parameters:

  • Spot pair: BTC/USDT

  • Market price: 54,000 USDT 

  • Upper price: 65,000 USDT

  • Lower price: 45,000 USDT 

  • Number of grids: 5

  • Intervals: 4,000

  • Total investment: 23,610 USDT

Grid Profit

Grid profits are realized from the auto buy and sell from the current grid trading strategy.

Formula

Grid Profit = Interval × Quantity of base token per grid (Buy Order) × Completed Grid Trade − Trading Fee

Trading Fee = Filled Order Quantity (Buy x Sell) x Trading Fee Rate x Sell Price

When the grid trading strategy is successfully activated, the base token required for the grid trading strategy will be automatically purchased, and the orders will be placed as follows: 

Buy 

Sell 

Quantity (BTC)

Price (USDT)

Price (USDT)

Quantity (BTC)

0.08795882

53,000

57,000

-

0.08795882

49,000 

61,000

0.08787086

0.08795882

45,000

65,000

0.08787086

Notes:

— You can view the quantity of each grid under Positions in the Details page.

— The quantity of sell orders is different from that of the buy orders due to the deduction of a 0.1% Spot trading fee.

When the BTC price hits 53,000 USDT, the buy order will be executed, and the sell order will be executed at 57,000 USDT, which will be placed above the next grid. When the price rises to 57,000 USDT, the sell order will be executed, and a buy order at 53,000 USDT will be placed. 

That is, a grid trade is completed and earns a profit of 341.81 USDT, based on the following calculation:

Grid Profit = 4,000 × 0.08795882 × 1 − 10.02 = 341.81 USDT

Trading Fee = (0.08795882 + 0.08787086) × 0.1% × 57,000 = 10.02 USDT

Note: Trading fee rates used here are for non-VIP users only. To learn more about Spot and Futures trading fees, please refer to Trading Fee Structure.

Total P&L

The total profit is the grid profit plus the profit or loss of the base token.

Formula 

Total Profit = (Equity of Base Token + Quote Token) − Total Investment

Revisiting Trader A’s case:

To view the value of the base token and quote token after the grid strategy has been successfully executed, please click on More –> Details on the right of the active grid bot column to enter the Details page, and then select Positions.

In this case, the position values ​​you can see under Positions are as follows:

Position Value (BTC): 0.17574172 

Position Value (USDT): 14,452.26

When the price rises to 57,000 USDT, Trader A's grid trading strategy completes a trade, profiting from the difference between 57,000 USDT and 53,000 USDT. As the price of BTC increases, so does the equity of the base token in your account: 

Total Profit = (57,000 × 0.17574172 + 14,452.26) − 23,610

= 859.54 USDT

Please note that when the base token value falls more than the profit earned by the grid bot, it will cause the total profit to turn negative.

Setting Up Your Copy Trade of Grid Trading

Leaderboard Explained: You can copy grid trading strategies by following the top-performing traders on the Grid Bot leaderboard. There are the following two ranking lists: 

  • Daily Ranking
  • 7-Day Ranking

Grid bots are ranked by total annual percentage rate (total APR), which is the sum of the profit or loss of the base token and grid profits. The rankings show the top ten performing grid bots based on the total APR performance over the past 24 hours and the past 7 days, respectively.

To learn more about how to calculate total APR, please refer to P&L Calculations (Spot Grid Bot).

Create Your Copy Trade Order

Here’s a step-by-step guide to help you create your copy trade order.

Step 1: Select Daily Ranking or 7-Day Ranking under Leaderboard on the Bybit Grid Bots page. 

Step 2: Select a grid bot you want to follow and click on Copy.

Step 3: Enter the amount you want to invest and click on Create.

Step 4: Double-check the order information and click on Create.

After you click on Create, the page will automatically redirect to My Grid Bots for you to view your active grid bots.

Notes

— The same trading strategy may not lead to the same profit level, due to different entry prices.

— Order adjustments or closing positions of traders you copy will not affect your copy trade positions. You need to manage the trading risk of the copied robot yourself.

Share Your Grid Bots

Step 1: Click on More to the right of Active Bots (under Bybit Grid Bots).

Step 2: Click on Details to the right of the Grid Bot you want to share.

Step 3

a. Turn on Allow Copy Trading, or

b. Share your grid strategy via copy trading URL by following these steps:

  • Click on the Share button

  • Click on Copy to share your copy trading URL with friends and/or followers

Your followers can copy your grid trades on Bybit by clicking on the URL you’ve shared.

Notes

— Allow Copy Trading is the default mode. However, if you wish to disable this feature, you can turn off the function as shown below:

— Only a grid bot that supports copy trading can be shared.

Terminating Your Grid Bots

Step 1: Head to My Grid Bots page.

Step 2: Click on Details of the grid bot column you want to close, and then tap on Terminate.

Step 3: Choose one of the following processing methods.

Using the BTC/USDT Spot Grid Bot as an example:

  • Received quote token — USDT

  • Currently holding tokens — BTC+USDT

  • Base Token — BTC

  • BIT

Notes:

 — Quote token is the default option.

 — Exchanges between tokens will be based on the market price, and the corresponding Spot fee will be charged. If the direct exchange between the two tokens isn’t supported, the base token will be converted into USDT first, which may involve two trading fees.

Step 4: Click Confirm.

After successful termination, your funds will automatically be transferred back to your Spot Account.

Next, the page will automatically redirect to the History page for you to view the history of the terminated grid bot, including Grid Profit, Filled Time, Avg. Filled Price, Filled Qty. and Trading Fees. 

Which Assets Should I Choose for a Settlement? The number of coins you receive will depend on your chosen settlement processing methods.

If you choose BTC+USDT, the amount of coin received will be the same as the total profit. If you choose USDT/BTC/BIT, the exchange between tokens will be based on the market price, and the corresponding Spot trading fee will be charged.

Are Grid Bots Profitable?

Grid profits are realized from the auto buy and sell from the current grid trading strategy. However, when the base token value falls more than the profit earned by the grid bot, it will cause the total profit to turn negative.

In addition, you may want to consider trading fees. The fee structure is the same as for rates incurred when you trade on Bybit's Spot and Futures platform. Please note that the trading fees will be charged when your Spot and Futures orders are successfully filled.

The Bottom Line

Grid trading strategies are suitable for volatile and sideways markets. Here’s a tip: When you set the order parameters, the system will adjust the limit of the maximum number of grids according to the price range you set in order to ensure that the grid trading strategy records positive profits (i.e., grid profits > trading fees) under normal market conditions. In addition, the copy trade feature for grid trading allows you to copy grid bots placed by expert traders. And if you’re an experienced trader, you can share your grid trading strategies with other traders. Get started with by creating your own grid trading bot today!

We hope this Bybit trading bot guide has been useful for you in your pursuit of automated investing and trading. Here's all the facts about our trading bots, summarized in one simple infographic.