Calculation Engines
Futures & Perpetuals
Direct synchronization. We mirror the exchange's internal accounting exactly as reported.
API SYNCsource: realizedPnl
Spot Trading
Advanced cost-basis tracking. We utilize the industry-standard FIFO method to calculate realized profit on every sell.
FIFO ENGINEView breakdown
The Logic
Realized P&L=
Revenue
-Sell Revenue
Quantity Sold × Sell Price
Cost Basis
-FIFO Cost
Sum of original purchase prices for the specific coins being sold.
Fees
Total Fees
Buy Fees (pro-rated) + Sell Fees. All converted to USD.
Interactive Analysis
Ledger History
BTC/USDTBUYJan 1
0.1 BTC
@ $40,000.00
BUYJan 5
0.05 BTC
@ $42,000.00
SELLJan 10
0.12 BTC
@ $45,000.00
Inventory State
Before any sale, we identify your available assets.
Calculated from previous BUY orders.
Available Holdings
0.15 BTC
Buy Side Fees
Fees paid in crypto (e.g., 0.0001 BTC) are converted to USD at the moment of trade execution. This locks in the fee cost permanently.
Fee(USD) = Fee_Qty × Spot_PriceSell Side Fees
Fees paid in quote currency (e.g., 5.4 USDT) require no conversion. They are deducted directly from the gross proceeds of the sale.
Fee(USD) = Fee_Qty (Raw)