Key Features
Real-Time & Historical
Latest balances and prices update in real time, with historical holdings available for tracking portfolios over time
Multi-Chain Aggregation
Request aggregated holdings across multiple chains in a single API call
PnL Calculation
Automatic profit and loss calculations using average cost basis methodology
Holdings Aggregation
Holdings data is aggregated at multiple time granularities with corresponding retention periods:Granularity | Retention |
---|---|
15s | 5 days |
5m | 30 days |
1h | All |
1d | All |
PnL Methodology
PnL calculations are based on the average cost basis method, which takes a weighted average of all token purchases and reweights the average cost during sale events.- Latest PnL
- Historical PnL
- Calculation Details
Latest PnL represents the current unrealized profit or loss for a wallet’s holdings.Formula:Where:
- Current Balance = Latest token balance for the address
- Current Price = Latest token price in USD
- Average Cost = Weighted average cost of the token
Example Scenario
Action | Token | Amount | Balance | Price | Average Cost Calculation | PnL |
---|---|---|---|---|---|---|
Buy | SOL | 50 | 50 | $210 | (50 × $210) / 50 | $0 |
Buy | SOL | 10 | 60 | $200 | (50 × 200) / 60 | -$500 |
Sell | SOL | 10 | 50 | $220 | Previous avg cost maintained | $583.50 |
Sell | SOL | 2 | 48 | $220 | Previous avg cost maintained | $560.16 |
Price check | SOL | — | 48 | $230 | 48 × $208.33 / 48 | $1,040.16 |
Buy | SOL | 7 | 55 | $180 | (48 × 180) / 55 | -$1,359.84 |
Price check | SOL | — | 55 | $185 | $204.72 | -$1,084.60 |
Supported Chains
Currently supported: Bitcoin and SolanaSupport for additional chains and liquidity pool-based pricing is in development. Interested in testing the Holdings API? Contact us to discuss your needs.