Trading bot FAQ

Published on 12 Feb 2025Updated on 11 Apr 202512 min read

What's a trading bot?

Trading bots are automated software programs that execute trades on your behalf based on specific parameters and rules that are configured by you.

There are two types of trading bots offered on our platform - both come with a risk that you should carefully consider before trading:

  • Spot grid bot: divides a price range into levels, buying low and selling high within this range.

  • Dollar-cost averaging (DCA) bot: buys more crypto if price falls, doubling down on each order and aiming to sell at a profit when the price rises.

Trading bots place orders directly on the main OKX spot order books, just like manual trades made on the platform. The bot uses the parameters you've set to decide when and how to place buy and sell orders based on real-time market conditions.

Please note that it's your responsibility to ensure all bot settings are configured correctly, as incorrect inputs may result in unexpected outcomes. Trading bots don't guarantee profits and carry inherent risks, including but not limited to the potential for losses due to market volatility and unforeseen market changes.

  • Trading bots aren't designed to provide investment advice: your use of trading bots doesn't grant us control over your account's trading activities, nor should they be seen as an offer to buy, sell, or hold digital assets. You acknowledge that using one or more Trading Bots may incur fees charged by us for the underlying trades.

  • Risk of loss: using Trading Bots may result in the total loss of the digital assets or fiat funds that you allocate to them. You should carefully evaluate whether trading or holding digital assets is appropriate for your financial situation. We recommend consulting a legal, tax, or investment professional regarding your specific circumstances.

  • Price slippage risk: during periods of high market volatility or low liquidity, price slippage may occur, causing trades to be executed at a price significantly different from the order price. For example, a buy order set at $30,000 during a rapid market drop may execute at $29,800, potentially impacting your trading strategy.

  • Reduction in available margin: for wholesale customers who have access to derivatives trading on our platform, funds allocated to the Spot grid trading bot will be segregated from your trading account, reducing your available margin. This could result in forced liquidation of your open positions if there's insufficient margin. Ensure that you monitor the risk levels of your other open positions closely, as this could affect your ability to maintain them.

  • Terms of use: your use of Trading Bots is governed by our Terms of Service and/or other agreements you have entered into with us. We make no representations or warranties and assume no liability beyond what's outlined in those agreements.

Are there any fees involved?

All our bots are completely free to create and use. However, when your bot places trades, Our standard trading fees apply, and these fees are automatically deducted with each trade. If the bot makes frequent trades, like in low liquidity or highly volatile markets, these fees can add up over time and may affect your overall returns.

Keep this in mind, especially if your bot is set up for frequent trades, as it could impact your overall returns.

Learn more about fees here.

When does a trading bot stop?

A trading bot will stop operating under the following circumstances:

  • Based on your parameter settings: the bot will stop trading when it reaches specific conditions or thresholds you have configured:

    • Spot grid bot: if the price falls below the lower limit of the price range, the bot will stop placing new orders.

    • DCA bot: if the number of safety orders reaches the maximum limit, the bot won't place further orders.

You can also configure stop-loss limits and profit targets which will automatically stop the bot once those orders are executed.

  • Unpredictable circumstances: the bot may stop operating due to unforeseen circumstances that trigger our Risk Management Stop (RMS) protocols, such as the delisting or suspension of underlying cryptocurrency.

  • Manual stop: you can manually stop the bot at any time by selecting the 'Stop' button on the platform.

It's your responsibility to check on your trading bots regularly to see if any of them have stopped due to the above.

Spot grid trading bot-specific FAQ

What's a spot-grid trading bot?

A spot grid bot is a trading bot that you can customise and deploy to automatically place buy and sell orders at set intervals and within a specified price range. The aim of the spot grid bot is to systematically buy at lower prices and sell at higher prices within a specified price range. As with all bots, there's no guarantee that this aim will be achieved. The bot will only operate according to the parameters you set.

The term 'grid' refers to the intervals between trading levels where these orders are placed.

How does a spot grid bot work?

A spot grid bot is designed to buy crypto at low prices and sell it at higher prices within a specified price range, aiming to generate incremental profits. When it's activated, it spends a portion of your allocated trading funds to buy crypto based on your set trading range and the current market price. The bot then places buy orders below the current price and sell orders above it at set intervals, known as grids, which together form your entire trading range.

When the crypto price reaches a buy or sell level, the trade is automatically executed. After this, the bot then places new buy orders below the current price and sells orders above it once again. This setup allows the bot to continuously buy low and sell high.

Grid trading doesn't guarantee profits and has limitations, amongst others: in a strongly trending market, buy or sell orders may remain unfilled, or in a downtrend, filled buy orders may lead to losses. The grid bot may lack flexibility should market conditions suddenly change, and have higher than expected trading costs due to the number of orders being executed, particularly in volatile markets.

How do I create a spot grid bot and set the parameters?

You can create a spot grid bot by setting the following key parameters:

  • Lower price: the lowest price level at which the bot will operate. The bot will stop placing orders if the market price falls below this level.

  • Upper price: the highest price level at which the bot will operate. The bot will stop placing orders if the market price exceeds this level.

  • Grid quantity: this refers to the number of price levels (grids) that your selected price range is divided into. The bot will place buy and sell orders at each level. You can choose between arithmetic (evenly spaced grids) or geometric (proportionally spaced grids) distribution. Having more grids means the bot will execute smaller trades more frequently. Fewer grids result in larger trades but less frequent execution. For example, if the price range is 100-400, and you set the grid quantity to 3 with arithmetic mode, it would create three grids: 100-200, 200-300, and 300-400.

  • Grid mode:

    • Arithmetic: maintains a consistent difference between each grid level (for example, 1, 2, 3, 4).

    • Geometric: maintains a consistent ratio between each grid level (for example, 1, 2, 4, 8).

  • Investment amount: this is the total amount of the selected currency the bot will use to place buy and sell orders across the grids. The maximum amount is usually the available balance in your trading account for the selected currency.

Other optional parameters:

  • Trailing up/down: this option allows the bot to automatically adjust the grid as the price moves, improving flexibility and maximizing capital utilization by adapting to market fluctuations.

  • Take profit (TP) price: an optional price target. If the price reaches this level, the bot will stop trading and sell all base assets at the market price.

  • Stop loss (SL) price: another optional setting aiming to limit losses. If the price drops to this level, the bot will stop trading and sell all base assets at the market price.

How do I manage my spot grid bots?

From the trading bot dashboard, you can monitor and manage your spot grid bot:

  1. Modify parameters: adjust the bot's price range and grid quantity even after it’s active, allowing flexibility in response to market changes.

  2. Withdraw profits: transfer grid profits earned by the bot directly to your trading account.

  3. Stop your bot: when you stop the bot, all pending orders are cancelled. You can choose to either sell crypto at the market price or keep it. In both cases, funds or crypto are transferred to your trading account.

  4. View details: check the Bot Details page for real-time performance insights and statistics. On this page, you can view the amount of filled orders, which represent the total number of completed orders, and the amount of matched trades, which represent the total number of completed buy and sell pairs executed by the spot grid bot within your configured price range.

  5. Replicate Setup: Recreate a bot with the same parameters.

Learn more about spot grid trading bot and how you can utilize it here.

Dollar-cost averaging (DCA) trading bot-specific FAQ

What's a dollar-cost averaging (DCA) bot?

A DCA bot is a trading bot that allows you to purchase crypto at multiple price levels and aims to sell it for a profit if your target is reached. This bot aims to help you achieve a better average buying price by automatically placing additional buy orders when the price falls. If your profit target is reached, the bot automatically sells your crypto holdings. As with all bots, there's no guarantee that this aim will be achieved. The bot will only operate according to the parameters you set.

How does a dollar-cost averaging (DCA) bot work?

A DCA bot begins by placing a buy order at a specific price. If the price falls, based on your settings, the bot executes another buy order, and this cycle continues until you hit your maximum number of orders, take profit level, or stop loss level.

Cycles: If the price reaches your take profit level, the bot sells your crypto holdings and then starts another cycle starting from the first buy order. However, if the price hits your stop loss level, the bot halts all activity and won't start a new cycle.

Please note that DCA bots don't guarantee profits and may result in losses, especially in declining markets where the stop loss level could trigger. Additionally, the incremental buying approach may limit gains in rising markets.

How do I create a dollar-cost averaging (DCA) bot and set the parameters?

You can create a DCA bot by setting the following key parameters:

  • Price steps: defines the percentage difference at which safety orders will be executed. For example, if set to 1%, the bot will place safety orders at 1% price drops.

  • Take profit (TP) target per cycle: specify the percentage profit the bot should aim for in each cycle. When the bot achieves this target price, it ends the current cycle, completes the order, and starts a new cycle as specified.

  • Initial order amount: the starting investment amount for each cycle, placed by the bot to initiate the DCA strategy.

  • Safety order amount: the amount used for each safety order within a cycle. These incremental orders are placed at your configured price steps to lower the average entry price.

  • Max safety orders: determine the maximum number of safety orders the bot can place per cycle. The actual number depends on available funds.

Other optional parameters:

  • Amount multiplier: set a multiplier to increase the size of each subsequent safety order as the price moves against the initial order. For example, a multiplier of 1.5 will make each safety order 50% larger than the previous one.

  • Price steps multiplier: adjusts the price gap between each safety order. This setting incrementally increases or decreases the gap between safety orders as the price changes. For example, with a 1% initial price step and a multiplier of 2, the safety orders will be placed at 1%, 3%, 7%, and so on (doubling the gap after each order).

  • Stop loss (SL): another optional setting to limit losses. If the price drops to this level, the bot will stop trading and sell all base assets at the market price.

How do I manage my dollar-cost averaging (DCA) bots?

From the trading bot dashboard, you can monitor and manage your DCA Bot:

  1. Stop your bot: When you stop the bot, all pending orders are cancelled. You can choose to either sell any available crypto at the market price or keep it. In both cases, funds or crypto are transferred to your trading account.

  2. View details: check the bot details page to monitor performance, including active cycles and profit/loss metrics.

  3. Replicate setup: recreate a bot with the same parameters.

Looking to understand the DCA bot, particularly the Martingale strategy? Find out more here.