Spot Grid

Published on Jun 17, 2022Updated on Apr 4, 20245 min read

Spot Grid is temporarily not supported under portfolio accounts.

1. What is Spot Grid trading?

Spot grid trading is an automated strategy to buy and sell assets in a configured price range. It creates a grid of gradual orders (i.e., at incrementally increasing and decreasing prices) with preset intervals, placing them above and below a base price you set.

2. Use cases of Spot Grid trading

The essence of spot grid trading strategy is to profit by "buying low, selling high", and this strategy performs the best in a oscillating bullish market. However, in bearish market using Spot Grid trading might results in losses.

3. How do I set up a spot grid trading bot?

3.1. Steps Overview

  1. Enter OKX on your PC or mobile and navigate to Trade, select Trading bot mode (at the top left corner on the web and top right corner on the mobile app), and click Spot grid.

  2. Enter parameters manually or use backtested AI parameters on the trading interface, and confirm the total investment amount to create a grid trading bot(After you create a bot, the initial funds will be isolated from your trading account and used for grid trading only).

  3. You can view and manage your bots on the Bots page.

  4. After the bot starts running, you can withdraw your earnings or stop the bot anytime.

3.2. Options and parameters

Setup Options

Set myself: Set parameters based on your own analysis of the market.

AI strategy: Use the parameters recommended by backtested strategy (The recommended parameters are selected based on the backtesting results over past 7 days using a proprietary smart algorithm)

Grid Trading Parameters

Lower price: The bot will stop placing orders when the market price is lower than the lowest price.

Upper price: The bot will stop placing orders when the market price is higher than the highest price.

Grid quantity: The number of grids represents the corresponding shares divided within the price range. For example, if the price range is 100-400, the mode is arithmetic, and the number of grids is 3, it is divided into three grids: 100-200, 200-300, and 300-400.

Grid - Arithmetic grid: It keeps the same common difference between each grid. (For example: 1, 2, 3, 4.)

Grid - Geometric grid: It keeps the same common ratio between each grid. (For example: 1, 2, 4, 8.)

Asset: Users can choose to invest either in the base currency or the quote currency or invest in both.

Amount: It refers to the amount of quote currency invested in the Trading bot. The maximum available amount of each quote currency equals the current maximum transferable amount of that currency in the Trading account.

Take-profit (TP) price: The Bot will stop working when the price reaches TP price, and the bot will close the position at TP price.

Stop-loss (SL) price: The Bot will stop working when the price falls to the SL price, and the bot will close the position at SL price.

3.3. Sample Case (BTC/USDT)

Bot Parameters

The lower price: 50,000 USDT

The upper price: 100,000 USDT

Grid quantity: 50

Grid mode: Arithmetic

Investment Amount: 5,000 USDT

BTC price when activate strategy: 60,100 USDT

Run the Bot

  1. Stage 1 - Initial order placement: The system will calculate the price of each grid, which are 50,000 USDT, 51,000 USDT, 52,000 USDT...98,000 USDT, 99,000 USDT, 100,000 USDT, and then place buy orders in each grid. If the market depth is great, the sell order will be opened in the nearest grid above upon the completion of the buy order, and the buy order will be opened in the nearest grid below. That is, after the Bot starts, there is a buy order at each grid from 50,000 USDT to 60,000 USDT and a sell order at each grid from 62,000 USDT to 100,000 USDT.

  2. Stage 2 - Bot operation: A buy order will be executed when the price drops below 60,000 USDT, and in the meantime, a sell order will be opened in the nearest grid above (61,000 USDT). If prices rise above 61,000 USDT, the sell order will be executed, and in the meantime, a buy order (60,000 USDT) will be opened in the nearest grid below.

In this way, the Trading bot helps you make profits by buying and selling orders at predefined price intervals. It allows you to take advantage of fluctuating market prices.

4. Risk reminder and notes

  1. If the price falls below the lower price of the defined price range, the bot will not continue to place additional orders. If the price continues to fall and does not return back to the pre-defined range, the crypto asset held at this time will suffer losses. Therefore, it is recommended to set a stop-loss price below the lower price to avoid taking excessive risk on your position.

  2. The fund invested in the grid will be isolated from your Trading account and used independently for the Trading bot. Therefore, users need to pay attention to the risk of overall positions in your Trading account after transferring funds.

  3. Our system will sell your assets at market price when the Bot is stopped manually or when the stop-loss price is triggered. If the risk management system judges that it will bring risks to the market, it may fail to sell your assets, but you can still decide whether to sell them manually or not.

  4. While the spot grid bot is running, if encounters unpredictable circumstances such as suspension or delisting of the underlying crypto asset, the bot will be automatically stopped.