I. How Is Spot PnL Calculated?
In a Spot Account, PnL is usually calculated using the following methods:
-
Realized PnL
PnL from completed trades = Net proceeds from sale − Corresponding purchase cost.
-
Unrealized PnL
Floating PnL based on current market price = Current market value − Historical position cost.
-
Fee
Including: Purchase fees + Sale fees. These are usually added to the cost or deducted from proceeds.
-
Change in Total Asset Value
Not equal to trade PnL, also includes:
- Deposit / Withdrawal / Transfer
- Airdrops and Event Rewards
- Exchange rate changes (if valued in fiat currency)
II. FAQs
Q1: Why are "Cost Price" and "Trading PnL" displayed as empty after transferring assets directly from the Fund Account to the Spot Account?
Scenario:
After you transfer an asset from your Fund Account to the Spot Account, the displayed Cost Price and Trading PnL for that token in the Spot Account may show as blank / no data.
Explanation:
- A transfer from Fund Account to Spot Account is essentially an internal transfer of the same asset between accounts, not a market buy or sell.
- The system cannot determine a unified "historical purchase cost" based on such transfers; therefore, it does not automatically generate cost price or PnL data.
- Until a spot trade occurs for that asset, the Cost Price and Trading PnL will remain blank.
System Behavior:
- This does not affect the actual safety or quantity of your assets, only the display of Cost Price/PnL.
- Once you complete a spot trade using this asset in your Spot Account (e.g., selling it or using it to buy another token), based on transaction records, the system will automatically:
- Calculate a new cost price.
- Track subsequent trading PnL data. - You may manually set or update the cost price of the asset.
Q2: How to Calculate Cost Price?
To help users manage position cost in different ways, spot assets support two types of cost price:
- Average Cost Price
Definition
Average Cost Price: Calculated solely based on buy trades, reflecting the average purchase price per unit. It does not take sell trades into account.
Calculation (dynamically updated with every new buy):
Average Cost Price = (Previous Average Cost Price × Quantity Before Latest Buy + Latest Buy Price × Quantity Bought)
÷ Latest Net Buy Quantity
Of which,
- Quantity Before Latest Buy: Holding quantity of that token in the Spot Account before the update.
- Quantity Bought: The added buy amount from this trade.
- Latest Net Buy Quantity: Quantity Before Latest Buy + Quantity Bought
2. Cumulative Cost Price
Definition
Cumulative Cost Price: Considers historical buy and sell transactions. Calculated based on net buy value, making it more suitable for accounting or tax purposes.
Calculation:
Cumulative Cost Price = (Total Buy Value − Total Sell Value) ÷ Net Buy Quantity
Of which,
- Total Buy Value: Sum of all buy trades = Σ (Buy Price × Quantity Bought)
- Total Sell Value: Sum of all sell trades = Σ (Sell Price × Quantity Sold)
- Net Buy Quantity: Total Buy Quantity − Total Sell Quantity
If the Net Buy Quantity is 0 or negative, the cost price may show as blank or be temporarily uncalculated.
3. Notes
-
Available data
Average Cost Price data is tracked starting from 2025-04-05.
Cumulative Cost Price data is tracked starting from 2025-04-05.
Historical trades before this date may not be included in the above two calculation methods for the cost price.
- Cost Price is used for analysis and display only. It doesn’t affect your asset quantity or available balance.
-
Manual Cost Price Adjustment
If you believe the system-calculated cost price differs from your records, you can adjust it as needed to better suit your personal accounting or investment management style.
Q3: Ignoring Fees
Typical Question:
"I bought at 100 and sold at 110, so I should earn 10 USDT. Why does the platform show only around 9 USDT as PnL?"
Example:
- Buy at 100 USDT, with 0.1 USDT fee
- Sell at 110 USDT, with 0.11 USDT fee
Item |
Incorrect Logic |
Correct Logic |
Purchase Cost |
100 | 100 + 0.1 = 100.1 |
Sell Revenue |
110 | 110 − 0.11 = 109.89 |
Realized PnL |
110 − 100 = +10 | 109.89 − 100.1 = +9.79 |
Key Point: Spot PnL includes fees on both sides (buy + sell) in the cost/revenue calculation, so actual profit is always less than or equal to the simple price difference you might expect.
Q4: Difference Between Realized and Unrealized PnL
Typical Question:
"I made a total of 2,000 USDT on this token but only sold part of it. Why isn't the Realized PnL 2,000 USDT?"
Fact:
- Realized PnL only comes from the portion you actually sold.
- PnL from remaining holdings is still considered "unrealized PnL".
Simplified Example:
- Total Position Cost: 10,000 USDT
- Current Total Market Value: 12,000 USDT (total unrealized gain 2,000 USDT)
-
Only 1/4 of the position is sold
Item
Incorrect Logic
Correct Logic
Total Unrealized Gain
Treat it as if all profit is fully realized at once Only 1/4 sold qualifies for realized PnL calculation Remaining 3/4 of Position
Think of it as "already locked in" Still unrealized PnL, continues to fluctuate with price
Key Point: Realized PnL in spot trading is linked to the "quantity sold" — no sale, no realized PnL.