cURL
User Portfolio
Get Portfolio Chart
Get historical performance data to visualize your portfolio’s growth over time
GET
cURL
10 credits per request
You will get
You will get
- Total portfolio value at different time points
- Performance metrics for various time ranges
- Historical Profit/Loss (PnL) data
Required
Required
This endpoint is only available for users with a Degen plan subscription (when using shareToken).
- shareToken OR portfolioId: Provide one of these to identify the portfolio.
- shareToken: Get this from your CoinStats portfolio page by clicking “Share”
- portfolioId: Use a portfolio connected via POST /portfolio/wallet or POST /portfolio/exchange
- If neither is provided, returns aggregated chart for all API-connected portfolios
- type: Specify the time range for the chart data (e.g., “24h”, “1w”, “1m”, “1y”)
Optional
Optional
- passcode: Passcode for accessing protected portfolio data (can be passed in header or query parameter)
Authorizations
API key required to access the endpoints. Generate one from your dashboard at https://openapi.coinstats.app and pass it in the X-API-KEY request header. Never expose your key in client-side code.
Headers
Passcode for accessing protected portfolio data
Example:
"123456"
Query Parameters
One of time periods.
Available options:
24h, 1w, 1m, 3m, 6m, 1y, all Example:
"24h"
Portfolio ID for accessing a specific API-connected portfolio. Required if shareToken is not provided.
Example:
"abc123def456"
Response
Portfolio Chart
Array of historical price data points. Each data point is an array containing:
- TIMESTAMP - Unix timestamp in seconds
- USD - Price in USD
- BTC - Price in Bitcoin
- ETH - Price in Ethereum
Example:
[
[
1755864000000,
297711.24614580005,
2.65026183,
69.53175117
],
[
1755864000000,
297711.24614580005,
2.65026183,
69.53175117
]
]