OKX Trading Bot

Intelligent pre-built trading bots are here to help you trade automatically and earn crypto all-day-long

Supercharge Your Trading With Trading Bots

Protect and secure your assets anytime, anywhere

24/7 automate your trading strategies and auto-arbitrage

Make profitable investments with powerful algorithmic trading bots

How to use the OKX crypto trading bot for automated crypto buys and sells

As one of the world’s leading cryptocurrency ecosystems, OKX offers a comprehensive suite of products and services. In addition to our extensive trading pairs, decentralized finance offerings and opportunities to generate passive income on investments, we provide a customizable crypto trading bot to help you leverage various automated trading strategies.

This guide introduces each of OKX’s crypto trading bot’s strategies and links to dedicated tutorials for each. The bot has seven different modes. The spot grid, futures grid, smart portfolio and recurring buy strategies are ideal for users of all experience and ability levels. Meanwhile, arbitrage, iceberg and TWAP modes are better suited to more experienced traders, as they carry greater risk and complexity, or are most effective when trading high volume orders.

Trading bots modes

The OKX trading bot has seven distinct modes — spot grid, futures grid, smart portfolio, recurring buy, arbitrage order, iceberg and TWAP (i.e., time-weighted average price) — suitable for varying purposes and needs.

Spot grid, futures grid, smart portfolio and recurring buy are the most straightforward modes to use and carry the least risk. They’re perfect for traders and investors of any ability level. Meanwhile, arbitrage order, iceberg order and TWAP are suited to more advanced users. These modes have more complex risk profiles or are only beneficial for those traders making larger orders.

Spot grid

The first mode, called spot grid, is ideal for traders of any volume and experience level hoping to lock in additional profits from asset volatility. The bot sets grid lines between an upper and lower price set by the user, and automatically sells crypto if the traded asset’s price increases and reaches one of the lines. Conversely, the bot automatically buys crypto if the price decreases to one of the lines.

You can determine the spot grid’s parameters yourself or choose the AI strategy, which is based on previous price movements. The AI strategy uses back-tested parameters that will likely result in the most profitable trades. Setting the trading bot grids yourself is slightly riskier but allows greater user control.

Futures grid

The futures grid trading bot is similar to spot grid mode but buys and sells long or short futures contracts rather than buying and selling assets in the spot market. Again, the futures trading bot uses a grid system to place orders above and below the current price, and buys and sells different futures contracts to profit from price volatility. Futures grid mode supports three distinct trading strategies: long, short and neutral.

A crucial difference between the futures and spot grid modes is the ability to trade with leverage on futures contracts. Users can amplify their position size with leverage, potentially making it a more capital-efficient strategy that can result in more significant gains. Of course, leverage trading carries its own risks, and it’s crucial to understand them before using the futures grid trading bot.

Smart portfolio

Smart portfolio is the trading bot’s automated portfolio balancing feature. When using the strategy, traders specify how much of their chosen crypto assets should make up their smart portfolio. If price volatility causes an asset to represent more than its intended allocation, the bot automatically sells the asset to buy those that are underperforming.

The bot supports two rebalancing triggers. In “scheduled” mode, it checks the proportion of each asset at regular intervals set by the user. If it observes a deviation from the intended allocations, it sells the asset that has increased in total portfolio share and uses the proceeds to buy the other asset or assets.

In “proportional” mode, the bot only rebalances the portfolio when it has become imbalanced by a user-determined percentage. Suppose you set up your smart portfolio to rebalance on a 5% or more imbalance with a 25% ETH allocation, a 25% SOL allocation and a 50% BTC allocation. If BTC price pumps relative to ETH and SOL, and your BTC becomes 80% or more of your total portfolio, the bot will sell BTC to buy ETH and SOL.

Effectively, the smart portfolio bot takes profit for you and diversifies it into other assets that have not pumped yet. The trading bot strategy works best with portfolios comprising correlated but volatile assets.

Smart portfolio mode is highly customizable, too. In addition to the two distinct rebalance triggers, you can include up to 10 cryptos in your portfolio and specify an individual percentage for each.

Recurring buy

Recurring buy is one of OKX’s automated dollar-cost averaging tools. You can use it to buy into up to 20 different cryptocurrencies at regular intervals to average out a crypto investment’s cost basis.

The recurring buy crypto trading bot strategy uses your USDT balance to buy crypto at chosen intervals. OKX also supports recurring buys with credit and debit cards via the “Buy Crypto” section. You can learn more about making regular crypto purchases with fiat currency directly in this guide.

Dollar-cost averaging is one of the most straightforward investment strategies because it doesn’t require any skill, only long-term conviction in an asset. OKX’s recurring buy trading bot makes the DCA strategy even more straightforward to implement — you literally just set it and forget it!

Arbitrage order

The arbitrage order trading bot simplifies locking in profits from price discrepancies between different trading instruments supported on OKX. The arb crypto bot seeks to create what are known as “delta neutral” positions. This means that if one position loses money, the other leg of the trade will make the same amount, resulting in no loss or gain. Profits come from price differences between instruments or funding rate payments made by perpetual swap traders holding positions in profit.

The arbitrage crypto trading bot has two modes. In funding rate arbitrage mode, a long or short position is opened in the spot market for any supported crypto. At the same time, the bot opens the opposite position in the same asset with a perpetual swap. The two positions should be delta neutral, which means that any funding rate payments received from the trader on the other side of the perpetual swap are profit.

Spread arbitrage mode presents opportunities to profit from the price difference between futures contracts with different settlement dates, or futures and spot prices. When the bot opens delta neutral positions with the same underlying asset using two differently priced instruments, the difference becomes profit at the settlement time.

Although the arbitrage crypto trading bot makes it very easy to implement profitable arbs between different instruments, it is a slightly more complex strategy than those mentioned above. There is also more risk involved, particularly when making custom arbitrage portfolios. Therefore, we do not recommend the arbitrage bot to absolute newcomers to cryptocurrency trading.

Accessing OKX’s trading bot

Visit the OKX homepage and log in to your account using the Login button at the top-right corner of the screen. Enter your email address or telephone number and password, and click Log in. Alternatively, you can scan the QR code using the OKX application.

Complete any two-factor authentication checks you have active on your account and click Continue.

Back on the OKX homepage, hover over Trade and click Trading bot.

You’ll see the different trading bot strategies listed below the chart in the Trade section.

Placing Iceberg orders using the trading bot

Iceberg orders are large buys or sells broken down into many smaller orders. They are particularly useful when making a large trade relative to the size of the market. Even a smaller order can move the asset price in illiquid markets, resulting in a less favorable entry or exit. Iceberg orders attempt to mask large orders and limit the impact of price slippage.

To enter iceberg mode, click Iceberg from the trading bot options.

In the Iceberg section, select the product and trading pair you want to trade using the menu in the top-left corner. You can use the trading bot in the Spot, Perpetual, Futures, Margin and Options markets. Select the desired instrument and then the trading pair from the list.

Next, enter the amount of slippage you will tolerate — i.e., the amount by which the price can move when executing your trade — in the price range field. You can do this in increments of the trading pair’s base asset using the “Var.” option or as a percentage of your order price by using the “Ratio” option.

Under “Price limit,” enter your ideal exit or entry price. This is the minimum price at which your sell orders will execute or the maximum price of buy orders.

Then, enter the average amount of each of your smaller orders and the total position size. Click Buy (Long) or Sell (Short) to place your iceberg trade.

Check your trade details on the next pop-up window and click Confirm.

Placing TWAP orders using the trading bot

TWAP mode — short for time-weighted average price — seeks to execute a large trade over a specified period. It is similar to an iceberg order in that it attempts to enter or exit a market with a large position without significantly moving the asset’s price.

To enter the trading bot’s TWAP mode, click TWAP from the bot selection page.

Now, once again, select your desired trading pair and instrument using the menu to the top-left of the TWAP section.

Choose whether you want to buy or sell the first asset listed in the trading pair and input your tolerated price slippage. Selecting “Var.” enables you to enter an amount denoted in the second asset from the trading pair. Meanwhile, “Ratio” allows you to choose your slippage based on a percentage move from the limit price.

Next, enter your desired limit price, the time interval at which you want the bot to make trades and the size of each buy or sell. Finally, enter the total trade amount and click Buy [asset].

Check your trade details and click Confirm on the next screen to initiate the bot.

Stopping the trading bot and closing trades

You can check on any trades you have created using the trading bot in the “Bots” tab of the trading dashboard. Here you can view details of your trades, including their profitability to date, and here is also where you can stop the bot manually.

Just click Stop next to the relevant trade to stop an active bot.

You can then keep the asset traded or exit your position to USDT. Choose the appropriate option and click Confirm.

Your trade will then disappear from the “Bots” section and appear in your “History.”

If you experience any difficulties using the trading bot, feel free to contact our support team via the OKX Telegram group or our dedicated Support Center.