Skip to main content

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
You’ll need a share token to access portfolio data. Share tokens are available to all CoinStats users — generate one from the Share button on your portfolio. Learn more about Share Token Authentication.

Get Portfolio Chart Data

Retrieve historical portfolio performance data:
8 credits per request

Headers

Query Parameters

Time Range Options

With Passcode

For passcode-protected portfolios, add the passcode header:

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

Solution: Include the share token in your request
Solution: Use one of the valid time range options (24h, 1w, 1m, 3m, 6m, 1y, all)
Solution: Check that your API key is correct and active
Solution: Verify your share token is correct
Solution: Include the correct passcode in your request
Chart data availability depends on your portfolio’s history. New portfolios may have limited historical data for longer time ranges.

Best Practices

  • 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)
  • Check for empty arrays or null values in responses
  • Implement fallbacks for portfolios with limited history
  • Use line charts for continuous data
  • Add annotations for significant events (large deposits/withdrawals)
  • Include percentage changes in chart titles for context

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