How Total PnL and Spot Grid Profits Work

·

Understanding your trading bot's performance starts with knowing how profits and losses are calculated. In automated spot grid trading, three key metrics help you track results: Total PnL (Profit and Loss), Grid Profits, and Unrealized/Non-Grid PnL. Each provides a different lens into your bot’s activity—offering clarity on realized gains, open positions, and overall equity changes.

Let’s break down what each term means, how they’re calculated, and why they matter for your trading strategy.


What Is the Difference Between Total PnL, Grid Profits, and Non-Grid PnL?

Total PnL reflects the complete profit or loss of your trading bot at any given moment. It’s a real-time snapshot that combines both realized gains (from completed trades) and unrealized gains or losses (from open positions).

Within this total, two components are displayed separately:

These sub-metrics are designed to improve transparency. However, it's important to note: they are estimates based on predefined calculation methods and may not perfectly reflect real-time market dynamics, especially during fast-moving or volatile conditions.

💡 Note: If you’ve enabled Simple Earn Allocation, any earnings generated through this feature will appear under a separate field labeled Simple Earn Earnings, distinct from grid trading performance.

How Is Total PnL Calculated?

Total PnL measures the change in your bot’s net equity over time. It compares the current value of your bot’s holdings—based on real-time market prices—to the initial capital you invested, adjusted for any additional deposits or withdrawals.

Formula:

Total PnL = Current Bot Equity – Initial Capital ± Adjustments

This includes:

Example:

You start a bot with 100 USDT. Over time, due to successful grid trading and price movements, the current equity grows to 200 USDT.

👉 See how automated bots can grow your portfolio over time.

Your Total PnL = 200 – 100 = 100 USDT.

This number gives you a full picture of your bot’s performance—including both locked-in gains and unrealized fluctuations in asset value.


How Are Grid Profits Calculated?

Grid Profits estimate the net gains from completed grid cycles—each cycle being a successful "buy low, sell high" sequence within your defined price range.

It is calculated by summing up the individual profits from all successful grid executions in your trade history. While this metric shows how much your bot has earned purely from grid trading, it does not include:

Therefore, Grid Profits serve as a reference point—not the complete financial picture.

Example: Calculating Grid Profit for a BTC/USDT Trade

Consider a simple spot grid trade pair involving one buy and one sell:

ActionAmount (BTC)Fill Price (USDT)Fee DeductedNotes
Buy0.00005222100,0000.00000005222 BTCFee deducted in base currency (BTC)
Sell0.00005216101,0005.26816 USDTFee deducted in quote currency (USDT)

Key Observations:

These residual assets stay in the bot until it's stopped, then get returned to your wallet.


Step-by-Step Grid Profit Estimation

To calculate estimated Grid Profit for this trade:

  1. Align Buy and Sell Quantities
    Use the smaller side (here: sell amount = 0.00005216 BTC) for consistency.
  2. Calculate Gross Profit (Before Fees)

    Gross Profit = Quantity × (Sell Price – Buy Price)
                 = 0.00005216 × (101,000 – 100,000)
                 = 5.216 USDT
  3. Deduct Fees

    • Sell Fee: Already known = 5.26816 USDT
    • Buy Fee (converted to USDT):
      = 0.00005216 BTC × 100,000 USDT/BTC × 0.1% = 5.216 USDT
  4. Final Grid Profit Estimate

    Grid Profit = Gross Profit – Buy Fee – Sell Fee
                = 5.216 – 5.216 – 5.26816
                = –5.26816 USDT? ❌

Wait—that can’t be right.

Let’s correct the earlier typo:
Gross profit should be:

= 0.00005216 × 1,000 = 52.16 * 1e-3 = 5.216 × 1e-2 = **0.5216 USDT**

So corrected:

Thus:

Grid Profit = $52.16 – $5.216 – $5.268 ≈ $41.676 cents → **~$41.68**

✅ Final Estimated Grid Profit ≈ $41.68 per thousand units traded

⚠️ Disclaimer: This is an approximation. Actual results may vary slightly due to rounding, fee types (maker vs taker), account tier discounts, and execution method.

What Is Non-Grid PnL?

Non-Grid PnL represents the part of your Total PnL not explained by completed grid cycles.

It’s calculated as:

Non-Grid PnL = Total PnL – Grid Profits

This typically includes:

Like Grid Profits, Non-Grid PnL is an estimate used for visibility—not an exact accounting of tradable profits.


Why Can’t I Withdraw All My Grid Profits Immediately?

You might notice that even when Grid Profits show positive returns, the withdrawable amount is sometimes lower—or even zero.

Several factors influence this:

1. Prior Withdrawals

If you've already withdrawn profits from the same bot, the available balance resets accordingly—even if cumulative Grid Profits remain high.

2. Reinvestment After Modifications

Adjusting your grid parameters or adding new funds often triggers automatic reinvestment of existing profits. This resets the withdrawable balance to zero to maintain operational stability.

3. Rounding and Fee Approximations

Since fees are deducted in different currencies and calculations involve rounding, small discrepancies occur. A fraction of assets may be retained to cover future trades.

4. Exchange Minimum Trade Sizes

Tiny leftover balances below minimum trade thresholds cannot be sold and must stay in the bot.

👉 Learn how smart profit management keeps your bot running smoothly.

The system ensures you can only withdraw an amount that leaves sufficient capital for ongoing operations—protecting your strategy’s integrity.

When you initiate a withdrawal, the platform calculates the maximum safe withdrawal amount—ensuring your bot continues functioning without interruption.


Frequently Asked Questions (FAQ)

Q: Are Grid Profits guaranteed earnings?

No. Grid Profits are estimates based on completed cycles but do not account for all fees or market slippage. They represent potential realized gains, not final withdrawable cash.

Q: Does Total PnL include trading fees?

Yes. Total PnL accounts for all costs—including maker and taker fees—making it the most accurate reflection of true profitability.

Q: Can Non-Grid PnL be negative?

Yes. If asset prices drop significantly outside your grid range, Non-Grid PnL can become negative, reflecting unrealized losses on held assets.

Q: Why is there leftover cryptocurrency after trading?

Due to fee deductions in different currencies and exchange precision rules, micro-balances often remain. These are returned to your wallet when the bot stops.

Q: Do I earn interest on idle funds in a grid bot?

Only if features like Simple Earn Allocation are enabled. Otherwise, untraded funds remain idle unless used in future grid levels.

Q: How often are these metrics updated?

Metrics update in near real-time based on market data and trade execution logs—but slight delays may occur during high volatility.


Final Thoughts

While Grid Profits offer insight into your bot’s active trading performance, Total PnL remains the definitive measure of overall success.

By understanding how these metrics interact—and why certain profits aren't immediately withdrawable—you gain better control over your automated strategies.

Whether you're optimizing for steady income or long-term growth, clarity on PnL mechanics empowers smarter decisions.

👉 Start building smarter trading bots today with powerful tools designed for precision and profit.