Skip to main content
GET
/
portfolio
/
chart
Get historical performance data to visualize your portfolio's growth over time
curl --request GET \
  --url https://openapiv1.coinstats.app/portfolio/chart \
  --header 'X-API-KEY: <api-key>'
{
  "result": [
    [
      1755864000000,
      297711.24614580005,
      2.65026183,
      69.53175117
    ],
    [
      1755864000000,
      297711.24614580005,
      2.65026183,
      69.53175117
    ]
  ]
}
10 credits per request
  • Total portfolio value at different time points
  • Performance metrics for various time ranges
  • Historical Profit/Loss (PnL) data
This endpoint is only available for users with a Degen plan subscription.
  • shareToken: Get this from your CoinStats portfolio page by clicking “Share” and copying the token from the share URL
  • type: Specify the time range for the chart data (e.g., “24h”, “1w”, “1m”, “1y”)
  • passcode: Passcode for accessing protected portfolio data (can be passed in header or query parameter)

Authorizations

X-API-KEY
string
header
required

API key needed to access the endpoints. Example: 'demo-api-key'

Headers

passcode
string

Passcode for accessing protected portfolio data

Example:

"123456"

Query Parameters

shareToken
string
required
type
enum<string>
required

One of time periods.

Available options:
24h,
1w,
1m,
3m,
6m,
1y,
all
Example:

"24h"

passcode
string

Passcode for accessing protected portfolio data

Example:

"123456"

Response

Portfolio Chart

result
any[][]
required

Array of historical price data points. Each data point is an array containing:

  1. TIMESTAMP - Unix timestamp in seconds
  2. USD - Price in USD
  3. BTC - Price in Bitcoin
  4. ETH - Price in Ethereum
Example:
[
[
1755864000000,
297711.24614580005,
2.65026183,
69.53175117
],
[
1755864000000,
297711.24614580005,
2.65026183,
69.53175117
]
]
I