Understanding your true investment performance in cryptocurrency requires more than just tracking price movements—it demands accurate cost basis calculations. On platforms like OKX, the spot cost price is a critical metric that helps traders assess profitability and make informed decisions. This guide breaks down how spot cost price works across different account types, explains key calculation methods, and provides real-world examples to help you optimize your trading strategy.
What Is Spot Cost Price?
The spot cost price represents the average price at which you acquired a cryptocurrency through spot trading. It serves as the baseline for calculating unrealized profit and loss (PnL). OKX offers two distinct versions of this metric:
- Asset Overview Spot Cost Price
- Trading Account Spot Cost Price
While both aim to reflect your entry cost, they differ in scope and calculation methodology.
Asset Overview Spot Cost Price
This version provides a holistic view of your holdings by aggregating assets from multiple accounts:
- Trading Account
- Funding Account
- Earn Account
✅ Key Features:
- Uses the average cost method exclusively
- Includes all transfers between accounts without resetting cost basis
- Ideal for users who want a unified view of their total portfolio cost
📌 Example:
Suppose your Asset Overview shows 1 ETH with a cost price of $3,000. If you transfer that ETH from your Funding Account to your Trading Account, the cost price remains unchanged at $3,000. Transfers do not alter the weighted average.
👉 Discover how real-time cost tracking can improve your trading accuracy.
Trading Account Spot Cost Price
This metric focuses only on assets actively held within the Trading Account. What sets it apart is its flexibility in calculation methods:
- Average Cost Method
- Cumulative Cost Method
You can switch between these modes in your trading settings, depending on your analytical needs.
Average Cost Method
This approach updates your cost basis each time you buy more of an asset. Selling does not affect the average purchase price.
🔹 Formula:
Average Cost Price = (Previous Avg Price × Previous Amount + New Buy Price × New Amount) / Total Net Amount
Cumulative Cost Method
This method accounts for both buys and sells, effectively adjusting your cost basis based on net inflows and outflows.
🔹 Formula:
Cumulative Cost Price = (Total Buy Value – Total Sell Value) / Net Buying Amount
Each method serves different strategic purposes:
- Use Average Cost to monitor long-term holding value
- Use Cumulative Cost to evaluate active trading performance
Real-World Calculation Examples
Let’s explore how these methods work using a step-by-step scenario involving ETH purchases and sales.
🟢 Scenario 1: Initial Purchase
You start with no ETH. On Day 1, you buy 2 ETH at $3,000 each. The current market price (last price) is $3,500.
Average Cost Price:
- = (0 + 3000 × 2) / 2 = $3,000
- PnL = (3500 – 3000) × 2 = $1,000
- PnL Ratio = (3500 – 3000) / 3000 ≈ 16.67%
Cumulative Cost Price:
- = (3000 × 2 – 0) / 2 = $3,000
- PnL = (2 × 3500) – (2 × 3000) + 0 = $1,000
- PnL Ratio = 1000 / (6000 – 0) ≈ 16.67%
At this stage, both methods yield identical results since there have been no sales.
🟡 Scenario 2: Partial Sale
On Day 2, you sell 1 ETH at $3,500. The latest price rises to $4,000.
Average Cost Price:
- Remains $3,000 (sells don’t affect average)
- PnL = (4000 – 3000) × 1 = $1,000
- PnL Ratio = (4000 – 3000) / 3000 ≈ 33.3%
Cumulative Cost Price:
- = (6000 – 3500) / 1 = $2,500
- PnL = (1 × 4000) – 6000 + 3500 = $1,500
- PnL Ratio = 1500 / (6000 – 3500) = 60%
💡 Insight: The cumulative method reflects higher profitability because it reduces your effective cost basis after a profitable sale.
🔵 Scenario 3: Additional Purchase
On Day 3, you buy another ETH at $4,000. The price climbs to $4,500.
Average Cost Price:
- = (3000 × 1 + 4000 × 1) / 2 = $3,500
- PnL = (4500 – 3500) × 2 = $2,000
- PnL Ratio = (4500 – 3500) / 3500 ≈ 28.6%
Cumulative Cost Price:
- = (6000 + 4000 – 3500) / 2 = $3,250
- PnL = (2 × 4500) – (6000 + 4000) + 3500 = $2,500
- PnL Ratio = 2500 / (10,000 – 3500) ≈ 38.5%
👉 See how dynamic cost models adapt to active trading strategies.
Key Notes & Limitations
To ensure accurate interpretation of your spot cost price data, keep the following points in mind:
🔸 Data Availability: Calculations are only available for trades occurring on or after November 6, 2020. Earlier activity is not included.
🔸 Included Activities:
- Spot trades
- Fund transfers from terminated strategy bots (e.g., spot grid trading)
- Conversions via Convert, Simple Trade, One-Click Repay, or Easy Convert
🔸 Excluded Assets:
- Stablecoins (e.g., USDT, USDC)
- Fiat currencies
These exclusions help maintain clarity in crypto-specific performance tracking.
API Integration for Developers
For users building custom dashboards or analytics tools, OKX provides Open API access with dedicated fields for retrieving cost price data.
Metric | Average Cost Field | Cumulative Cost Field |
---|---|---|
Cost Price | openAvgPx | accAvgPx |
Profit & Loss | spotUpl | totalPnl |
PnL Ratio | spotUplRatio | totalPnlRatio |
Net Holding Amount | spotBal | spotBal |
This allows seamless integration into third-party applications for real-time portfolio monitoring.
Frequently Asked Questions (FAQ)
Q: What’s the difference between Asset Overview and Trading Account cost prices?
A: The Asset Overview combines holdings from Trading, Funding, and Earn accounts using a weighted average. The Trading Account version only includes assets in the trading wallet and supports both average and cumulative cost models.
Q: Does transferring crypto between accounts reset my cost basis?
A: No. Transfers between Funding, Trading, and Earn accounts do not affect your spot cost price on OKX. The original acquisition cost is preserved.
Q: Why do I see different PnL values under average vs. cumulative cost?
A: The cumulative method factors in profits from past sales, lowering your effective cost basis. This often results in higher reported PnL compared to the average method, which ignores sell transactions when recalculating cost.
Q: Can I use spot cost price for tax reporting?
A: While spot cost price offers useful insights, it may not align with tax accounting standards like FIFO or specific identification. Always consult a tax professional for compliance purposes.
Q: Are stablecoins included in spot cost calculations?
A: No. Stablecoins and fiat currencies are excluded from spot cost price metrics to focus analysis on volatile digital assets.
Q: How often is the spot cost price updated?
A: The cost price is updated in real time whenever you execute a qualifying transaction—such as a spot trade or conversion—within your account.
👉 Start using advanced cost tracking to refine your trading edge today.