Understanding your cryptocurrency investment performance starts with accurately calculating your cost basis. On platforms like OKX, the spot cost price plays a crucial role in helping traders assess their profits, losses, and overall portfolio health. This guide breaks down the two primary types of spot cost prices available on OKX—Asset Overview Spot Cost Price and Trading Account Spot Cost Price—and explains how they are calculated, when to use them, and what factors influence their values.
Whether you're a beginner tracking your first trades or an experienced trader optimizing strategies, knowing how these metrics work empowers better decision-making.
👉 Discover how real-time cost tracking can improve your trading strategy today.
Understanding Asset Overview Spot Cost Price
The Asset Overview Spot Cost Price provides a holistic view of your average purchase price across multiple account types: the Trading Account, Funding Account, and Earn Account. This unified metric is especially useful for users who hold assets in different sections of their wallet and want a comprehensive understanding of their total investment cost.
Key Features
- Calculation Method: Uses the weighted average cost method, factoring in both the quantity and acquisition price of each asset across all supported accounts.
- Transfer Resilience: Moving assets between accounts (e.g., transferring ETH from Funding to Trading) does not alter the overall cost basis. The system maintains continuity in valuation.
Broad Scope: Includes holdings from:
- Spot trading activities
- Assets held in funding or savings accounts
- Tokens earned through yield-generating products
For example, if your Asset Overview shows 1 ETH at a cost price of $3,000, transferring that ETH from your Funding Account to your Trading Account won’t change the recorded cost—it remains $3,000.
This makes the Asset Overview ideal for long-term investors focused on net portfolio performance rather than individual trade-level analysis.
Exploring Trading Account Spot Cost Price
In contrast, the Trading Account Spot Cost Price focuses exclusively on assets actively held within the Trading Account. What sets it apart is its flexibility: users can choose between two calculation methods—Average Cost and Cumulative Cost—depending on their analytical needs.
You can switch between these modes directly in the trading settings, allowing for dynamic assessment based on your strategy.
1. Average Cost Price
This method calculates the mean purchase price of all buys made for a given asset. It updates only when new purchases are executed and ignores sale transactions in the cost computation.
Formula:
Average Cost Price = (Previous average cost × Previous amount + New buy price × New amount) / Total net holdingUse Case:
Best suited for determining optimal entry and exit points when building a position over time.
2. Cumulative Cost Price
A more advanced metric, this method accounts for both buying and selling activity. It reflects the net financial flow from all trades, making it highly responsive to market timing and partial exits.
Formula:
Cumulative Cost Price = (Total value of all buys – Total value of all sells) / Net holdingsUse Case:
Ideal for evaluating profitability after multiple buy/sell cycles—especially valuable for active traders using grid bots or scalping strategies.
👉 See how switching cost calculation methods can reveal hidden gains in your portfolio.
Practical Calculation Examples
Let’s walk through real-world scenarios to illustrate how each method works.
Scenario 1: Initial Purchase
- Day 1: Buy 2 ETH at $3,000 each
- Last market price: $3,500
Average Cost:
- Cost = (0 + 3000 × 2) / 2 = $3,000
- PnL = (3500 – 3000) × 2 = $1,000
- PnL Ratio = (500 / 3000) × 100% ≈ 16.67%
Cumulative Cost:
- Cost = (6000 – 0) / 2 = $3,000
- PnL = (3500 × 2) – 6000 + 0 = $1,000
- Same PnL ratio: 16.67%
At this stage, both methods yield identical results since no sales have occurred.
Scenario 2: Partial Sale
- Day 2: Sell 1 ETH at $3,500
- New market price: $4,000
Average Cost:
- Remains unchanged at $3,000
- PnL = (4000 – 3000) × 1 = $1,000
- PnL Ratio = 1000 / 3000 ≈ 33.3%
Cumulative Cost:
- Cost = (6000 – 3500) / 1 = $2,500
- PnL = (4000 × 1) – 6000 + 3500 = $1,500
- PnL Ratio = 1500 / (6000 – 3500) = 60%
Here, cumulative cost reflects higher efficiency due to locking in gains from the sale.
Scenario 3: Re-entry After Sale
- Day 3: Buy 1 ETH at $4,000
- Market price rises to $4,500
Average Cost:
- New avg = (3000×1 + 4000×1)/2 = $3,500
- PnL = (4500 – 3500) × 2 = $2,000
- Ratio ≈ 28.6%
Cumulative Cost:
- Cost = (6000 + 4000 – 3500)/2 = $3,250
- PnL = (4500×2) – (6k+4k) + 3500 = $2,500
- Ratio ≈ 38.5%
The cumulative method continues to show superior return measurement by incorporating realized profits.
Important Notes & Data Inclusion
To ensure accuracy and consistency:
- Data History: Calculations are effective from November 6, 2020, onward.
Included Activities:
- Spot trades
- Fund transfers after stopping strategy bots (e.g., spot grid bots)
- Exchange functions like Convert, Simple Trade, One-Click Repay, and Easy Convert
- Exclusions: Stablecoins and fiat currencies are not factored into spot cost price computations.
These rules help maintain clarity and prevent distortion from non-trading-related movements.
API Integration for Developers
For automated tracking or third-party analytics tools, OKX offers Open API access with dedicated fields for both cost models:
| Metric | Average Cost Field | Cumulative Cost Field |
|---|---|---|
| Cost Price | openAvgPx | accAvgPx |
| Profit & Loss | spotUpl | totalPnl |
| PnL Ratio | spotUplRatio | totalPnlRatio |
| Net Holding Size | spotBal | spotBal |
This enables seamless integration into dashboards or algorithmic trading systems.
Frequently Asked Questions (FAQ)
Q: What’s the difference between Asset Overview and Trading Account cost prices?
A: The Asset Overview includes assets across Trading, Funding, and Earn Accounts using average cost only. The Trading Account allows switching between average and cumulative cost but covers only assets within that specific account.
Q: Why do my profits differ between average and cumulative cost methods?
A: The cumulative method accounts for proceeds from past sales, which lowers effective cost basis and increases perceived profitability after partial exits.
Q: Can transfers between accounts affect my cost price?
A: No. Internal transfers do not impact the cost basis under either model.
Q: Are stablecoins included in spot cost calculations?
A: No. Stablecoins and fiat currencies are excluded from both calculation methods.
Q: From which date is historical data available?
A: All calculations are based on activity starting from November 6, 2020.
Q: How can I use this data for tax reporting?
A: While these metrics support performance tracking, consult a tax professional—specific jurisdictions may require FIFO or other accounting methods.
👉 Start leveraging precise cost tracking to maximize your crypto returns now.