MeowQuant is an independent third-party information site, not owned or operated by any exchange. This page contains no promotional links or invite codes. Full disclosure →

OKX · Grid readings

Total PnL is the only true profit figure on an OKX Spot Grid bot

The Grid Profits figure on an OKX Spot Grid bot can be larger than the amount you are able to withdraw. Of the three profit figures on the bot's details page, only Total PnL can be read as the real result. To tell whether the bot is up or down, look at that one number, which combines realized and unrealized gains. Grid Profits and Unpaired PnL are components of it, displayed separately to show what is driving the result, and both are estimates shown for display, not the bot's actual profit and loss.

One subtraction ties the three together: Unpaired PnL = Total PnL − Grid Profits. When Grid Profits keeps climbing while Total PnL is negative, the loss is sitting in Unpaired PnL. When the profit you work out from the order history doesn't match the page, the gap is recorded there too.

The formulas behind Total PnL, Grid Profits and Unpaired PnL

A running Spot Grid bot's details page carries three profit figures: Total PnL, Grid Profits and Unpaired PnL. The formulas and descriptions in the table below are from OKX's Help Center article “How do total Profit and Loss (PnL) and Grid profits work for Spot Grid?”.

ReadingHow it is calculatedHow OKX characterizes it
Total PnLCurrent bot equity (based on live market prices) minus the initial equity when the bot was created, plus or minus any top-ups or withdrawals; it includes realized profits from completed trades, trading fees and unrealized PnL from open positions“an accurate and comprehensive representation” of the bot's actual profit and loss
Grid ProfitsThe sum of the profits from all completed grid cycles (order groups where both the buy and the sell have filled), net of the trading fees on those fillsAn estimate, shown for reference and breakdown purposes
Unpaired PnLTotal PnL − Grid Profits, which is the remaining portion of Total PnL not tied to completed grid tradesAn estimate intended for display purposes only

OKX's example for Total PnL is short: a bot started with 100 USDT whose current equity is 200 USDT has Total PnL = 200 − 100 = 100 USDT. The figure moves with the market price, so it floats.

With Simple Earn Allocation enabled, profits generated from Earn appear under a separate field labeled Simple Earn earnings.

OKX help article on Spot Grid PnL, the section explaining the difference between Total PnL, Grid Profits and Unpaired PnL on a bot
The opening section of the Spot Grid PnL article in OKX's Help Center, screenshot taken 2026-10.

Grid Profits for one order group, step by step through OKX's example

The same article works through one order group on BTC/USDT: a buy filled at 100,000 USDT, a sell filled at 101,000 USDT, and an assumed fee rate of 0.1%. The buy fee is deducted in BTC and the sell fee in USDT, so the BTC held after the buy and the BTC sold are not quite equal:

  • Buy amount 0.00005222 BTC, buy fee 0.00000005222 BTC, net BTC held after the buy 0.00005222 − 0.00000005222 = 0.00005216778 BTC;
  • Sell amount 0.00005216 BTC;
  • Left over: 0.00000000778 BTC. Exchange rules can prevent the sale of amounts below the minimum tradable quantity, so it stays in the bot and is returned when the bot is stopped.

To estimate Grid Profits, the quantity on both sides is aligned using the executed sell amount, 0.00005216 BTC, and three steps follow:

StepCalculationResult (USDT)
Gross profit (before fees)0.00005216 × (101,000 − 100,000)0.05216
Buy fee, approximated in USDT0.00005216 × 100,000 × 0.1%0.005216
Sell fee0.00005216 × 101,000 × 0.1%0.00526816
Grid Profit0.05216 − 0.005216 − 0.005268160.04167584

To check one of your own order groups, take four things from the order history: the buy price, the sell price, the sell amount and the fee rate you were actually charged, then run them through the same steps. Use the rate from your own fills, because actual fees vary based on execution type (maker or taker) and account tier, and the 0.1% is only the example's assumption. A result that differs from the page only many decimal places down may come from rounding, and Grid Profits is an approximation to begin with.

Why is Total PnL negative when Grid Profits is positive?

Turn the subtraction around: Total PnL = Grid Profits + Unpaired PnL. Grid Profits only grows after both the buy and the sell of a cycle have filled, so it reflects the buy-low, sell-high rounds that are already finished. Unpaired PnL holds everything else, starting with partially filled grid orders, “when the buy leg is completed” and the sell leg is still waiting to execute.

OKX's guide “What's the Spot Grid bot and how do I use it?” includes this among the limitations of grid trading: “in a downtrend, filled buy orders may lead to losses”. As the price falls, the buy orders below fill one grid after another while their paired sell orders wait above. The coins bought are valued at the current market price, and the floating loss goes into Unpaired PnL. Once that loss is larger than Grid Profits, Total PnL turns negative. A positive Grid Profits figure on the page does not mean the bot is making money.

Stopping the bot leaves two choices for that position: sell the crypto at the market price or keep it, and in both cases the funds or crypto are transferred to your trading account. Selling turns the unpaired part into an actual profit or loss at the market price at the moment of the stop. Keeping it hands the coins back as they are, with the floating result still riding on the coin's price. With a Stop loss (SL) price set, a drop to that level makes the bot stop trading and sell all base assets at the market price, which ends the same way as choosing to sell. A bot stopped through the OKX grid trading API faces the same choice in the required stopType field: on a spot grid, 1 sells the base currency and 2 keeps it.

An order group that shows less profit than your own calculation

OKX's Spot grid bot FAQ puts this gap down to how initialization orders are handled for visualization purposes. Its example is a BTC/USDT grid with a range of 100,000 to 110,000 and 10 grids, created when the market price is 102,000. The theoretical buy orders above 102,000 sit between 103,000 and 109,000, but at initialization they are filled at the market price, around 102,000.

Later the top-most grid has its sell order executed at 110,000. On the actual fill prices, the spread on that group is 110,000 − 102,000 = 8,000 USDT per BTC. For display, the order group takes the buy price to be the theoretical 109,000, so the spread it shows is only 110,000 − 109,000 = 1,000 USDT. The 7,000 USDT in between is not lost: profits from fills at better prices than the theoretical ones are accounted for under Unpaired PnL, and Total PnL is still accurate.

The other mismatch comes from order groups that have been reset. Editing the range or grid number on a running bot, or adding investment, makes the bot cancel its existing orders and place new ones based on its current assets, and the order groups reset along with them. In OKX's example, an initial investment of 1,000 USDT has become 500 USDT and 0.005 BTC held by the bot over time; after an edit, the system recalculates the order groups from scratch using those assets, and a SELL can appear before the BUY. This is a visualization reset only, and profits not associated with the order groups are likewise reflected under Unpaired PnL.

Why can you withdraw less than the Grid Profits figure?

Grid Profits is an estimate for display, and the amount available to withdraw can be lower. Three things reduce it:

  • part of the Grid Profits was already withdrawn earlier from the same bot;
  • a Grid Edit or Add Investment reinvested the accumulated Grid Profits that hadn't been withdrawn, resetting the withdrawable amount to zero (interest generated from Simple Earn is not reinvested);
  • Grid Profits is an approximation that may include small rounding differences or estimated fees, and in some cases tiny residual amounts below the minimum trade size may also remain in the bot, so a portion of the profits has to be retained to support forthcoming orders.

The system calculates the maximum amount that can be safely withdrawn, so that after the withdrawal the bot still has enough balance to support its open orders and keep running. Withdrawing profits transfers that amount to your trading account. The number to look at beforehand is this withdrawable amount, so don't plan around the Grid Profits figure.

Risk note: Grid Profits and Unpaired PnL are estimates for display; they are not the bot's actual profit and loss and not a promise of returns. Grid trading doesn't guarantee profits, and in a downtrend filled buy orders may lead to losses. The prices, amounts and 0.1% fee rate in this article come from the examples in OKX's Help Center. Sources: OKX Help Center, “How do total Profit and Loss (PnL) and Grid profits work for Spot Grid?”, “Spot grid bot FAQ” and “What's the Spot Grid bot and how do I use it?”. This article is not investment advice. Only use money you can afford to lose entirely, and take responsibility for your own trading decisions.