Portfolio Performance Chart
Get historical data to visualize your portfolio’s performance over various time periods. This endpoint provides time-series data showing how your portfolio value has changed, perfect for creating charts and analyzing trends.Key Features
- Multiple Time Ranges: View data from 24 hours to all-time history
- Time-Series Data: Arrays of timestamps and corresponding values
- Performance Tracking: Track portfolio growth and declines over time
- Historical Profit/Loss: See how your PnL has evolved
- Trend Analysis: Identify patterns and market cycles in your portfolio
Your API key gives access to all of your own portfolios — no share token needed. Pass a
portfolioId from GET /portfolio/list to target one portfolio, or omit it to get aggregated data for all your portfolios. A share token is only needed to read someone else’s shared portfolio.Get Portfolio Chart Data
Retrieve historical portfolio performance data:8 credits per request
Headers
Query Parameters
Time Range Options
Shared Portfolio (Share Token)
To read a portfolio someone shared with you, pass its share token instead ofportfolioId. Add the passcode header if the shared portfolio is protected:
Example Response
The response is an array of arrays, where each sub-array contains[timestamp, value]:
Data Format
- First element: Unix timestamp in milliseconds
- Second element: Portfolio value in USD at that timestamp
Visualization Examples
JavaScript Chart Example
Using Chart.js to visualize portfolio performance:Python Visualization
Using matplotlib to plot portfolio data:Use Cases
Performance Dashboard
Build interactive dashboards showing portfolio growth over time
Trend Analysis
Identify bull and bear market cycles in your portfolio
Goal Tracking
Monitor progress toward investment goals with visual charts
Historical Reports
Generate historical performance reports for any time period
Calculate Performance Metrics
Use chart data to calculate custom metrics:Comparing Time Periods
Compare performance across different time ranges:Error Handling
Invalid Type Parameter (400)
Invalid Type Parameter (400)
Portfolio Not Found (404)
Portfolio Not Found (404)
portfolioId returned by GET /portfolio/list. If you are reading a shared portfolio, verify the share token is correctPasscode Required (409)
Passcode Required (409)
Best Practices
Optimize API Calls
Optimize API Calls
- Cache chart data and refresh periodically rather than on every page load
- Use appropriate time ranges for your use case (24h for real-time, 1m for recent trends)
Handle Missing Data
Handle Missing Data
- Check for empty arrays or null values in responses
- Implement fallbacks for portfolios with limited history
Visualization Tips
Visualization Tips
- Use line charts for continuous data
- Add annotations for significant events (large deposits/withdrawals)
- Include percentage changes in chart titles for context
Related Endpoints
Portfolio Value
Get current portfolio value and overall metrics
Portfolio Coins
View detailed holdings and coin-level performance
Portfolio Transactions
Access complete transaction history
Portfolio Snapshots
Get historical portfolio snapshot data