Spot grid crypto trading bot — how to automate grid trading strategies on OKX | Beginners Tutorial| OKX Academy

OKX offers many cutting-edge features to help traders quickly deploy sophisticated trading strategies. Among them is our crypto trading bot — a powerful, straightforward-to-use automated trading tool with seven different strategy modes. This tutorial focuses on the spot grid trading bot. Check out this dedicated guide to learn about the bot’s other functions.   

Spot grid mode enables you to set a manual price range or use a back-tested AI strategy according to which the trading bot will execute automated buys and sells. The bot automatically buys low and sells high, generating profits without requiring active management. The grid trading bot is particularly handy for high-volatility assets in bullish markets.

Spot grid trading bot in practice

Spot grid mode splits your starting capital between the two assets of your chosen trading pair. It then creates a grid of price points between the upper and lower bounds, and divides your starting funds equally between the number of grids used. 

Each time the price reaches the upper grid line, the bot automatically sells a portion of the asset. The bot automatically buys the traded asset when the price reaches the lower grid line. The trader profits from the difference between the buys and sells executed as the price swings.

Let’s consider the following example. Maxwell has $10,000 and wants to profit from BTC price volatility as it trades at $60,000. In manual spot grid mode, he sets a lower price of $50,000, an upper price of $70,000 and 20 grids. This places buy or sell orders at every $1,000 interval.

The bot divides his starting position — $10,000 — equally between the number of grid lines. In this case, each grid line is allocated $500 (10,000/20). 

Since the price when he opens his trade is exactly in the middle of his stated range ($60,000), half of his 10,000 USDT is immediately exchanged for BTC. Under this setup, the bot establishes $500 BTC sell orders at $61,000, $62,000, etc., up to $70,000, and $500 BTC buy orders at $59,000, $58,000, etc., down to $50,000. Each time the market price hits a buy or sell order, the bot rebalances the grid with the starting point at the new price. 

If the BTC price moves to $61,000 the next day, the bot sells $500 worth of BTC for USDT. The grid rebalances with BTC sell orders above $61,000 and buy orders below. If the price moves down to $60,000 again, it fills a buy trade and nets Maxwell just under $8.20 in profit — while also returning the BTC position to roughly its starting size.

If Maxwell had simply held his position, the price action described above would result in a $0 profit.

How to automate trades using the spot grid trading bot

To access the spot grid crypto trading bot, you must first select a spot trading pair. To do so, tap the trading pair at the top of the screen. 

Then, tap Spot and the trading pair you wish to trade with the spot grid bot. 

Then, tap Spot grid from the trading bot menu. 

Using the spot grid’s AI strategy

The easiest way to use the spot grid trading bot is with OKX’s back-tested AI strategy. This strategy determines the number of grids and price range on your behalf based on historical price data. 

In the spot grid section, select AI strategy.

Then, enter the total amount you want the bot to trade and tap Create.

On the next screen, check your order details and tap Confirm.

You can then check your open positions on the “Bot” tab at the bottom of the main trading dashboard. Tapping Close will exit positions associated with a particular order. You can also withdraw profits by tapping Profit withdrawal.

Manually setting the spot grid parameters

OKX’s crypto trading bot also allows you to manually determine the spot grid parameters. This is riskier than using the AI strategy — particularly for novice traders. However, it does allow for greater user control and potentially higher profitability. 

Tap Set myself in the spot grid section. 

Enter the upper and lower price bounds for your desired trading range. Then, enter the number of grids you would like to fill the range. This will determine the size of the buy and sell orders the bot creates. Next, enter the total amount you want to invest and select the investment cryptocurrency.

There is also an option to set how the grid is spaced. “Arithmetic” will position each grid line at fixed price intervals (e.g., every 20 USDT). Meanwhile, “Geometric” sets the grids using a fixed percentage from the current price, resulting in widening grids further out from the starting price. 

When you have determined the spot grid parameters, tap Create.

On the next screen, you have the option to add a price at which to take profit from your trade or stop loss. These are useful if the asset price increases or decreases beyond the range you set, and they essentially exit your position either in profit or to limit further losses. 

Enter your SL/TP levels, check the trade details and tap Confirm to deploy the spot grid trading bot.

You can check your open positions in the “Bots” tab on the main trading dashboard. Tapping Detail will show additional information about the trade, including the profits the grid has made and those occurring because of the price movement itself. Tapping Close will exit your spot grid positions. 

Automate spot trades with OKX’s grid trading bot

OKX’s spot grid crypto trading bot is an easy-to-use method of automating buys and sells. Those who want to profit from the extreme volatility associated with cryptocurrencies but might not have the time to study charts and actively manage positions can do so with the spot grid bot. 

Equipped with a back-tested AI strategy, even absolute newcomers to crypto trading can deploy the bot in just a few clicks. Meanwhile, more experienced traders can tweak the parameters themselves to potentially take even greater advantage of price volatility. Game on! 

Source: https://www.okx.com/academy/en/spot-grid-trading-bot