Understanding Total Profit and Loss (PnL) and Spot Grid Profits in Trading Bots

·

What’s the Difference Between Total PnL, Grid Profits, and Unassociated PnL in My Bot?

Total PnL reflects the overall profit or loss of your trading bot at any given time. It combines both realized and unrealized gains to provide an accurate snapshot of your bot’s performance.

Grid profits and unassociated PnL are components of total PnL. They’re displayed separately to help you understand what’s driving your bot’s performance. However, these are estimates based on predefined methodologies and may not always reflect real-time market fluctuations with 100% accuracy.

Note: If you’ve enabled Simple Earn Allocation, all earnings from this feature will appear under a separate field labeled Simple Earn Gains.

How Is "Total PnL" Calculated?

Total PnL measures the change in your bot’s equity over time, accounting for gains, losses, fees, and adjustments. It compares the bot’s current capital (based on real-time market prices) to its initial capital when created, plus/minus any updates or withdrawals.

Example:
If you started a bot with 100 USDT and its current equity is 200 USDT, your Total PnL = 200 - 100 = 100 USDT.

This figure includes:


How Are "Grid Profits" Calculated?

Grid profits represent estimated gains from completed grid cycles—each consisting of a buy-sell pair.

These are calculated by summing individual profits from successful grid executions in your transaction history. While grid profits highlight earnings from grid trading, they exclude:

Thus, total PnL offers a holistic view of your bot’s performance, while grid profits serve as a reference for grid-specific gains.

Example: Calculating Grid Profits for an Order Group

Order TypeAmount (BTC)Fill Price (USDT)Fee Deducted (0.1% Rate)Notes
BUY0.00005222100,0000.00000005222 BTCFee in base currency (BTC)
SELL0.00005216101,0000.00526816 USDTFee in quote currency (USDT)

Key Points:

Estimated Grid Profit Calculation:

  1. Align quantities using the sell amount (0.00005216 BTC).
  2. Gross profit = 0.00005216 BTC × (101,000 – 100,000) = 0.05216 USDT.
  3. Deduct fees:

    • Buy fee: 0.00005216 BTC × 100,000 × 0.1% ≈ 0.005216 USDT.
    • Sell fee: 0.00526816 USDT.
  4. Net grid profit = 0.05216 - 0.005216 - 0.00526816 = ~0.04168 USDT.

Disclaimer:


How Is "Unassociated PnL" Calculated?

Unassociated PnL represents the portion of total PnL not attributed to completed grid trading:

Unassociated PnL = Total PnL – Grid Profits

This typically includes:

Like grid profits, it’s an estimate for display purposes only.


FAQ: Common Questions About Grid Trading Bots

1. Why can’t I withdraw all my grid profits upfront?

Withdrawable amounts may be limited by:

👉 Learn how to maximize withdrawals

2. Do grid profits include fees?

Yes, estimated fees are deducted in the calculation, but actual fees may vary slightly.

3. What happens to leftover BTC in my bot?

Residual amounts (e.g., 0.00000000778 BTC) remain until the bot stops, then return to your wallet.

4. How accurate are grid profit estimates?

They’re approximations; total PnL provides the most accurate performance measure.


Final Notes

For optimal performance tracking, prioritize total PnL while using grid profits as a supplementary metric.

👉 Explore advanced grid trading strategies